Installshield with custom action

installationinstallshieldwindows-installer

I am creating a basic msi project using installsheild 2012 premier. I have two problems.

1.) The MSI needs to run a custom exe after it has created the folders and files of the application being installed. It needs to do this only once when the application is being installed.

2.) The MSI also needs to tell the custom exe being run, what language the user selected to run the MSI in.

I have no clue about problem 2. With regards to problem 1 here is my attempt as described below:

The way I have it setup now, it is running once right at the start before even creating the product's files and folders. Here below are my settings

enter image description here

and click next to go to the screen below….

enter image description here

Now, in order to run the custom exe only after the files and folders are created, if I change the In-Script execution from 'Immediate Execution' to 'Commit Execution' in the first image above and proceed to the next screen, then I get the following error with whatever combination I have tried
enter image description here

Please help me out here. Thanks for your time.

Best Answer

For In-Script Execution combo you should use deferred or commit execution. If your custom action needs Administrator privileges, it should be deferred or commit in System Context.

Deferred or commit actions do not run in InstallUISequence, so on Insert Into Sequence dialog make sure that Install UI Sequence combo is set to:

<Absent from sequence>

Deferred actions run before InstallFinalize. Since you want to run your custom action after installing the files, you can set Install Execute Sequence combo to:

After InstallFiles

The installation language is stored in ProductLanguage property. So you can use it directly in your custom action command line, for example:

[ProductLanguage]

This property contains the language identifier. You can find a list of identifiers here: http://msdn.microsoft.com/en-us/goglobal/bb964664.aspx

Related Topic