具有自定义操作的installshield [英] installshield with custom action

查看:66
本文介绍了具有自定义操作的installshield的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用installsheild 2012 Premier创建一个基本的msi项目.我有两个问题.

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

1.)MSI在创建要安装的应用程序的文件夹和文件后,需要运行自定义exe.在安装应用程序时,它只需要执行一次.

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.)MSI还需要告知正在运行的自定义exe,以及用户选择使用哪种语言运行MSI.

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

我对问题2毫无头绪.关于问题1,这是我的尝试,如下所述:

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....

现在,为了仅在创建文件和文件夹后运行自定义exe,如果我在上面的第一张图片中将脚本内执行从立即执行"更改为提交执行",然后进入下一个屏幕,那么无论我尝试哪种组合,都会收到以下错误消息

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.

推荐答案

对于脚本内执行组合,您应该使用提交执行.如果您的自定义操作需要管理员权限,则应将其推迟或在系统上下文中提交.

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.

延迟或提交操作未在InstallUISequence中运行,因此在插入序列" 对话框中,请确保将"安装UI序列"组合设置为:

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>

延迟的操作在 InstallFinalize 之前运行.由于要在安装文件后运行自定义操作,因此可以将安装执行顺序组合设置为:

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

安装语言存储在 ProductLanguage 属性.因此,您可以直接在您的计算机中使用自定义操作命令行,例如:

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

[ProductLanguage]

此属性包含语言标识符.您可以在此处找到标识符列表: http://msdn.microsoft.com/en-us/goglobal /bb964664.aspx

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

这篇关于具有自定义操作的installshield的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆