I am deploying my application using an msi installer designed with a Visual Studio Setup Project. How do I set a registry key to the application's install path?
相关问题
- How does the setup bootstrapper detect if prerequi
- Wix: How can I set, at runtime, the text to be dis
- Mysql-installer showing error : Memoy could not be
- Cancel installation from my custom action
- WiX: Multiple MSI files?
相关文章
- chained msi's/Bootstrapper/prerequisite?
- How to prevent WiX bundle with same UpgradeCode/Ve
- Running msiexec from a service (Local System accou
- Set InstallPath registry key using Visual Studio S
- Looking for a flexible windows installer product w
- Can I use msilib or other Python libraries to extr
- WIX 3.8 msiexec.exe /quiet Error 1603
- Setup Project for Visual Studio
on installer file (in class library project) write the follow code to write install path into registry.
Actually, while I was searching for the same thing the following solution was also mentioned:
use [TARGETDIR] in the registry key.
Just to add to putting [TARGETDIR] in the registry key as the value. If you are using the install shield for vs2012 use [INSTALLDIR] instead in the registry key.
One way to do this would be to create a custom action in your installer. On the custom action you could provide CustomActionData "/Path="[TARGETDIR]*". Within your custom action code you can reference Context.Parameters["Path"] and receive the installation path passed from the installer in your .NET code.
Now that you have the [TARGETDIR] within your custom action code you can continue to use the Microsoft.Win32 namespace to set the registry key.
HTH - Wil