uninstall dialogs - visual-studio-2010

I am composing a setup project in VS2010 . I want to add a dialog with checkbox for the user to specify if he wants to delete the database or not. But I can't figure out how to do it: the user interface doesn't represent the uninstall dialogs on the "view dialogs" form. So I can show a messagebox instead, but then there is another problem: how can a person specify whether the database should be deleted or not if the uninstaller is launched in a quited mode? In that case some parameters should be passed to the setup project somehow. Got any thoughts?

Right now I am trying to use Orca, it is a part of Windows Installer SDK.
http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en
It might solve my problem.

Related

WiX uninstall GUI

I'm creating an installer using wix for my project. For the installation of the project, wix uses a GUI
based on WIXUI_Mondo. When the application is uninstalled from control panel, the user just sees a small box with a progress bar. But i want to add a window asking the user if he made a backup of the configuration file for future use. In that window i also want to add two buttons one to proceed the uninstallation and another to abort the uninstall process.
I can't find anything on google about this, so do you guys know if this is possible and how i can achieve this?
Thanks in advance
You should be able to achieve this by setting the ARPNOREMOVE property. This will disable the Remove button so users have to run the Modify button to activate uninstall.
As far as I know there is no UI during uninstalling. The only way is a custom action (e.g. from DLL) with a dialog window.

In a Setup Project is it possible to validate the user input in a TextBox(A) dialog

I am using the VS 2010 to create a setup project, I am going to use the TextBox(A) dialog to capture user input.
I would also like to validate inputted value in these text box. Something likes the Next button just be enabled only when the first text box meets a specific criteria. So that, the installer just navigates user to next page when the validation passed.
Is it possible with the VS 2010?
There's no support in VS setups for doing this. It's a feature that's available in other tools and is part of Windows Installer, so you'd need to use another tool to add that functionality to the setup.
I know its not the exact you need but it will gives you idea on how to parse the value during install. See the following link in Scott Guru Blog
and post the solution if you find because for that sake i am now developing a click once application.

Change pre-defined message in Windows installer using VS 2010

I have looked at this question, but it is something different.
I need to change the message of MsiRMFilesInUse Dialog box.
Currently the message is "Do not close applications. (A reboot will be required.)"
I need to get it changed to "Do not close applications. (Application may not work)" .
The message comes when application is open, and user try to uninstall the app.
The only (but big) restriction is to do it in Visual Studio 2010 setup project. (Installshield/Wix are not allowed).
I have looked at custom action, not able to figure out how to change the message.
Another approach is to create a custom dialog box, but then i am not able to change the dialog box somehow. Also new dialog box has a very limited set of controls.
Per MsiRMFilesInUse Dialog (Windows)
The MsiRMFilesInUse Dialog box can be authored to display a list of
processes that are currently running files that need to be overwritten
or deleted by the installation. The user can select between options to
"Automatically close applications and restart them" or "Do not close
applications. (A reboot will be required.)" If the user selects the
"Automatically close applications and restart them" option, a push
button control on this dialog box can be authored to publish the
RMShutdownAndRestart control event and the Restart Manager can close
the applications and restart them at the end of the installation. This
can eliminate or reduce the need to restart the computer. For more
information, see System Reboots.
Notice the generous use of the word "can be authored". It is written this way because the perspective is of the Windows Installer SDK (Windows Platform). InstallShield (Basic MSI) and WiX (UI Extension) both author this table. Visual Studio Deployment Projects do not because Microsoft (DevDiv) never put the effort in to support it. You can't modify what isn't there.
Now if you are a Windows Installer expert ( which I doubt otherwise you wouldn't even be posting this question ) there are things that can be done. You can write postbuild commands to modify the built MSI to perform SQL updates and/or apply transforms to inject a custom authored dialog into your MSI after VS is done building it.
I've been down this road, I know how to do it. I also know how counterproductive it is as you'll find yourself doing it ALOT to make up for the short comings of the tool. At that point you understand why WiX / InstallShield is needed and move on.
And for the record, I once quit a very well paying job because VDPROJ is all the development managers would allow. I also returned a couple years later for even more $$$$ when they finally realized that they didn't know what they were talking about.
Good luck.

Displaying a message after successful uninstall in a VS2010 deployment project?

My VS2010 setup project works OK, but the uninstall process is completely non-interactive. It displays a progress window like the one below, then it vanishes with no feedback to the user. The user interface editor in VS2010 has only trees for "Install" and "Administrative Install", not for "Uninstall".
How can I display a MsgBox saying "[Product] has been successfully uninstalled" after the uninstall is completed?
A simple solution is to add a Commit custom action and condition it with:
REMOVE = "ALL"
Another approach is to set the ARPNOREMOVE property in your MSI. In this case the Control Panel Programs and Features applet will show only the Change option, which uses full UI. The Uninstall option which uses basic UI will not be visible.

Customizing Repair option in MSI

I have a Visual Studio Setup Project that is very basic except for one modification. I have two different libraries that I would like installed based on the user's selection. I added a checkbox screen and conditions to the files. They can install either component or both components. This all works fine.
Now for my requirement. Let's say that the user installed the MSI and selected only one component. Now, they need to install the second component from the same MSI. If they run the MSI again, I get the option to repair or remove. Repair will only fix the component that was installed originally. How can I give them the option to install the other components by showing the checkbox screen again?
If this functionality isn't available in a VS Setup Project, is there something else where it is? WiX perhaps?
I don't think VS Setup projects support this. Wix or MSI's created from other tools like Installshield can support this. The usual way to handle this would be to create separate features and assign the different components to each feature. Then if the MSI is built using WiX or some other tool, from add/remove there will be the Change button/option through which you can get the option to repair, modify, or uninstall. Modify then lets you change your feature selections without doing a reinstall.
You need to use the free MSI editors like ORCA or SuperORCA. Microsoft use to provide ORCA tool in their service pack. Not sure if they are continuing so. SuperORCA tool you can find at http://www.pantaray.com/msi_super_orca.html. Now when I had similar task to achieve following was my approach. I used SuperOrca to open my MSI file.
1] On repair/remove MSI dialog screen, add one more radiobutton for "Modify" - In SuperOrca-->Under RadioButton table --> Add entry for Modify radiobutton
2] Rename BackButton's text to "Reinstall" from its original "Back" --> In SuperOrca-->under Control table --> change Text property to rename Back to Reinstall
3] On selection of Repair/Remove radio button enable Finish button and disable Reinstall button. On select of modify radio button enable Reinstall button and disable Finish button - In SuperOrca--> Under ControlCondition table --> add entries for enable/disable "Reinstall" and "Finish" buttons for each comibinations for repair/remove screen (In my case dialog form name is "MaintananceForm")
4] Now from SuperOrca tools ControlEvent table find out conrol name for BackButton, In my case it is "PreviousButton". Now modify its Event, Argument & Condition entries from the table. And the values for these properties must be the same for the "Next" button properties from the Welcome screen of MSI file which redirects user to show installation options to choose.
Note: This is working fine for me. But when you re-select installation options again and click Next, somehow it does not forced for installing the selected option. Instead it repairs the MSI. I tried deleting entries from Windows\Installer folder so that MSI will not pick cashed installed version but no luck. If anybody is having answer on how to forced MSI to re-install through MSI setup wizard please let me know.

Resources