I am using Visual Studio's MSI plugin to create an install. My intentions is to make it run on startup using the registry HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
for example this is Skype's key in the registry
"C:\Program Files (x86)\Skype\Phone\Skype.exe" /minimized /regrun
The problem I have is I created a string key in that location but I just need to make sure it's pointing to my program I'm installing which would be in their "Application Folder" but I am not sure where that would be(Program Files or Program Files (x86) or user defined location).
Is there a variable I can put in the value that would point to my program despite where it goes?
The kind of thing you want in the Registry view in the IDE of the setup project is to have the Value of the string in the registry be [TARGETDIR]My.exe
TARGETDIR is the property name for the Application Folder (see the properties window) and specifying it in square brackets causes it to be resolved to the actual value at install time. Note that you don't need a slash because [TARGETDIR] has a trailing one.
This should be a good start, despite being old:
and the docs start here:
https://msdn.microsoft.com/en-us/library/wx3b589t(v=vs.100).aspx
and the standard properties start here, such as TARGETFIR:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa370905(v=vs.85).aspx