开发者

Visual Studio Deployment Project: Dependencies in the installation directory

开发者 https://www.devze.com 2023-01-31 15:07 出处:网络
I would like to install an add-on to an application. The application does not create a registry key that I can use to locate it. Therefore the user should specify the directory of the program, the ins

I would like to install an add-on to an application. The application does not create a registry key that I can use to locate it. Therefore the user should specify the directory of the program, the installer should check whether the programs files are in that directory and only if the main program is installed to that directory, install the add-on to that directory.

Can this be done with Visual Studio's Deployment Project?

As far as I can see, the VS Deploym开发者_JAVA技巧ent Project checks for dependencies only when starting the installer, not after the installation directory has been specified. Id like to get a second opinion before starting to use more advanced deployment tools.


No, this is not supported by Visual Studio.

What you need can be done by using a custom action on the "Next" button of the folder path dialog: http://msdn.microsoft.com/en-us/library/aa368322(VS.85).aspx

This custom action can check if the required files exist and set the result in an installer property. This property can then be used to condition the "NewDialog" control event which shows the next dialog. It can also be used to condition another custom action which shows a custom error message.

If you want a free solution you can try WiX. You should be able to define the custom action and DoAction published control event.

0

精彩评论

暂无评论...
验证码 换一张
取 消