I am working in installshield 2012 spring express edition.
I have created exe custom action which call exe developed in vb.net,
that exe has cancel button in it. If user Clicks on cancel button error box pops up in installshield setup (error code 1722)
I know why this error is coming but i don't want user to see this error and want to cancel the installation without showing error message to user.
Tell me if anyone need more detail.
There's a number of things at play here:
Don't use EXE custom actions. They run out of process and don't have access to the MSI handle and have a variety of other failure points. See: Integration Hurdles for EXE Custom Actions
Use WiX DTF instead to write a managed code custom action that is presented to the windows installer as a standard C++ Win32 DLL. See: WiX and DTF: Using a Custom Action to list available web sites on IIS
Your Custom action shouldn't present any UI at all. It should be publishing messages up to windows installer to be displayed on the progress dailog. If your custom action is prompting the user for information, this is wrong also. It should have done that in the UI Sequence during the user interview stage of the installation.
As you pass messages to the progress dialog, MSI will give you a return code that indicates the user has pressed the cancel button. You should then use this button to interrupt the processing in your custom action. Windows Installer will then rollback and display the Setup Interupted dialog. See: Any tips on getting the cancel button working for a deferred custom action
InstallShield Express is a very limited tool and may not be able to directly do all the authoring you need it to do. There are ways to extend it. See: Augmenting InstallShield using Windows Installer XML - Certificates
What I've shown you is the correct and proper way to do it. Anything else is suboptimal from an MSI best practices perspective.
Related
I created a setup file for my project with advanced installer but when i try to uninstall the package from control panel i don't see any dialog showing up telling me that uninstallation is a success, it's just run, uninstalling the application and then close. how can i add a dialog to show after uninstallation process?
I'm using advanced installer 12.3.1 and I'm using a custom theme if that is relevant to the question.
It's because your MSI uninstallation through Control Panel goes in Basic UI mode.
There are several ways to do what you want:
If you need simple end success or failure dialog:
you need to create a custom action which will change INSTALLUILEVEL to INSTALLUILEVEL_BASIC and INSTALLUILEVEL_ENDDIALOG. Please refer these links to find more information about it: MSDN and MSDN
The second way is a trick to hide Uninstall button from Add\Remove Programs and left only Change button. Then you need hide Change and Modify buttons from Maintenance dialog window in AdvancedInstaller (InstallShield, Orca, InstEd, etc). In this case you will receive uninstallation in Full UI mode.
I am trying to give my users the ability to select the drive they want to load our software to. Instead of just giving them the InstallChangeFolder dialog I am attempting to just list the drives that are available to load on. I have done this in an InstallScript project before but now we are trying to move to MSI. Basically the flow will be they select the drive and then we append our root path to that drive. Does anyone know of any good tutorials that would explain how to create a custom dialog for changing the installdir and wiring up in all of the custom actions and sequences. If it matters I am using InstallShield 2013 and a Basic MSI Project
Why do you want to hardcode your installation path? That seems like enforcing bad design decisions on your customers.
The default method of allowing the user to pick the installation path is the standard method, for a good reason.
I agree hard coding the path is a bad design, however in order to achieve what you want just create new custom action by going through custom action wizard selecting installscript file, copy your code of install script and add place newly created custom action in the correct sequence.
I have made a setup of a web application which could be installed multiple times in the same machine. I need to remove the sites created during installation at the time of uninstallation process. For this I wrote a custom action using a installer class.
Now, the problem is, if I have multiple installation of the same web application, custom uninstallation is being called only during the uninstallation of the last application.
Can somebody please help?
Thanks a lot in advance.
What tool did you use to author the MSI? What conditional expression did you use for the custom action?
My guess is you used a tool that abstracted you from this and that you are using component action states. It's not until the last client ( product ) of the shared component uninstalls that the component uninstalls and therefore the custom action is executed.
You should also know that installer class custom actions are known for their fragility. Using a WiX DTF ( Windows Installer XML, Deployment Tools Foundation ) managed custom action would be a much wiser choice.
I am a beginner level user of InstallShield. I've added a button in the Wizard interface. Now I want to add some code that's to be executed on clicking that. I don't Know the procedure to do that. Any Idea??
Read thexe blog articles to learn how to write and call DLL's from a suite installer.
Calling a Function in a DLL from a Wizard Page or Window in a Suite Installation
Validating User Input in a Suite Project
I created a setup file using InstallShield application.
Now, in one of the Installation Form, I have a checkbox control. By default it is unchecked. But after performing some operation on that form, I wants to check that checkbox control.
I am able to change its property, but the form is not getting refreshed.
Please Help me.
Thanks.
This is a known limitation in Windows Installer internal UI. Either roll an external UI handler ( InstallScript MSI project type for example ) or rethink your UI story to conform to what MSI is capable of doing.