How to Expose Install Directory as a Public Property in Visual Studio Setup Project
-
13-02-2021 - |
Question
My Windows Forms Application should be installed quietly using msiexec
. I'd like to expose the Install Directory as a Public Property to enable the system administrator to change it using the command line only. Something similar to this would be nice:
msiexec /i MySetup.msi /quiet INSTALLDIR="E:\MyTool"
Is there a way in Visual Studio to do this?
Solution
Visual Studio setup projects use TARGETDIR property for Application Folder. So you can use a command line which looks lime this:
msiexec /i MySetup.msi /quiet TARGETDIR="E:\MyTool"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow