且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Installshield中设置以在Windows启动时运行我的应用程序

更新时间:2023-01-30 08:13:28

在installshield 2011中,您可以使用 [网站]:



指定注册表项安装组件时在目标系统上创建:

在系统配置下的视图列表中,单击注册表。

Windows Installer项目:在查看过滤器列表中,单击要与注册表数据关联的组件。



如果选择了所有应用程序数据,则注册表视图是只读的。

InstallScript项目:在目标计算机的注册表视图窗格中,打开现有注册表集或通过右键单击Destina创建一个注册表集计算机文件夹。通过单击注册表集并在注册表集安装条件窗格中选择所需组件,将注册表集与一个或多个组件相关联。

在目标计算机的注册表视图窗格中,右键单击注册表配置单元或键,指向新建,然后单击密钥。 InstallShield添加一个名为New Key-n的新密钥(其中n是一个连续的数字)。

输入一个有意义的名称来重命名密钥,或者右键单击密钥并单击重命名以给它稍后使用新名称。

InstallShield使用空的默认字符串值添加新密钥。

默认情况下,您创建的所有密钥都设置为自动安装和卸载。这意味着如果安装了它们所属的组件,则会安装它们,并且在卸载该组件时卸载它们




有关Installshiel LE的更多信息,请参阅此链接



获取安装目录,属性[INSTALLDIR]可以使用 [ ^ ]:



此目录存储在常规信息视图的INSTALLDIR属性中。



使用注册表项设置INSTALLDIR值的一个限制是,在安装开始之前,注册表项必须存在于目标系统上。如果找不到注册表项,INSTALLDIR将设置为您为其输入的最后一个有效值。



例如,当您第一次创建安装项目时, INSTALLDIR的值是[ProgramFilesFolder]您的公司名称\Default。如果您要更改此内容以从注册表中读取,并且找不到注册表项,则INSTALLDIR将恢复为[ProgramFilesFolder]您的公司名称\Default的先前值。





您也可以从注册表中设置INSTALLDIR [ ^ ]。



我还是相信将应用程序的快捷方式放到启动系统文件夹是一个更简单的解决方案。
In installshield 2011, you can use the following approach from their [web site]:

To specify a registry key to be created on the target system when a component is installed:
In the View List under System Configuration, click Registry.
Windows Installer projects: In the View Filter list, click the component with which you want to associate the registry data.

If All Application Data is selected, the Registry view is read-only.
InstallScript projects: In the Destination computer’s Registry view pane, open an existing registry set or create one by right-clicking the Destination Computer folder. Associate the registry set with one or more components by clicking the registry set and selecting the desired components in the Registry Set Install Conditions pane.
In the Destination computer’s Registry view pane, right-click a registry hive or key, point to New, and then click Key. InstallShield adds a new key with the name New Key-n (where n is a successive number).
Enter a meaningful name to rename the key, or right-click the key and click Rename to give it a new name later.
InstallShield adds your new key with an empty default string value.
By default, all keys that you create are set for automatic installation and uninstallation. This means that they are installed if the component they belong to is installed, and they are uninstalled when that component in uninstalled


For more on Installshiel LE, you can consult to this link

For getting the installation directory, the property [INSTALLDIR] can be used[^]:

This directory is stored in the INSTALLDIR property in the General Information view.

One limitation of using a registry entry to set the value of INSTALLDIR is the fact that the registry entry must exist on the target system before your installation starts. If the registry entry cannot be found, INSTALLDIR is set to the last valid value you had entered for it.

For example, when you first create an installation project, the value of INSTALLDIR is [ProgramFilesFolder]Your Company Name\Default. If you were to change this to read from the registry, and the registry entry is not found, INSTALLDIR reverts to the previous value of [ProgramFilesFolder]Your Company Name\Default.


You can also set INSTALLDIR from registry [^].

Still I believe putting a shortcut of the application exe to the Startup system folder is an easier solution.