installshield with custom action

耗尽温柔 提交于 2019-12-06 06:47:12

问题


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

and click next to go to the screen below....

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

Please help me out here. Thanks for your time.


回答1:


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



来源:https://stackoverflow.com/questions/8167663/installshield-with-custom-action

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!