[英]Set Application Folder from Custom Action in Visual Studio Setup project
My Visual Studio 2008 Setup Project must choose the install directory automatically based on a configuration file. 我的Visual Studio 2008安装项目必须根据配置文件自动选择安装目录。 I'm using a C# class derived from
Installer
for the custom action. 我正在使用从
Installer
派生的C#类进行自定义操作。 I read the config file in my Install()
method. 我在
Install()
方法中读取了配置文件。
How do I change the installer's Application Folder from within this custom action? 如何从此自定义操作中更改安装程序的应用程序文件夹?
The installation folder path is stored in TARGETDIR property. 安装文件夹路径存储在TARGETDIR属性中。
Installer class actions cannot set Windows Installer properties, so you cannot use your current custom action to dynamically change the installation path. 安装程序类操作无法设置Windows Installer属性,因此您无法使用当前的自定义操作来动态更改安装路径。
Only the following custom action types can set installer properties: 只有以下自定义操作类型可以设置安装程序属性:
If you use one of them, you can set the TARGETDIR property to any path you need. 如果您使用其中一个,则可以将TARGETDIR属性设置为您需要的任何路径。
if this is a regular application you can also look at changing and or adding things here check out the screen shot 如果这是一个常规应用程序,您还可以查看更改和/或添加内容,请查看屏幕截图
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.