0
votes

In a visual studio setup project, is there a way I can enumerate the logical drives on the target machine and set a path on a drive on which windows is not installed as the value of the property "DefaultLocation" for the Application Folder instead of the usual [ProgramFilesFolder][Manufacturer]\[ProductName] ? Or is there a way I can force the users to select the installation path on a drive other than the windows drive, without which the installation should not proceed?

Thanks in advance.

1

1 Answers

0
votes

No, not in a Visual Studio setup project. There is no support for running any code during the UI sequence, and so there is no way to check the user's input if offered a dialog to choose the location.

Is there a problem you're trying to solve and this is the solution you've chosen? It's not clear why the standard location in Program Files is unacceptable.

If you were willing to force the issue you could write a launch program that would find the drive and then install the MSI (omitting the destination folder dialog) with a command line that includes TARGETDIR=[folder path for install]