Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I reference the installed path of a file in a registry value?

Tags:

wix

I want something like the following:

    <RegistryValue Id="Command"
                 Root="HKCR"
                 Key="myProgram\shell\open\command"
                 Type="string"
                 Value='"[SERVER_DIRECTORY]myProgram.exe" "%1"'
                 Action="write">
    </RegistryValue>

Where [SERVER_DIRECTORY] is the directory myProgram.exe is installed to (ProgramFiles64Folder\MyProgram). How can I do this?

like image 743
fredley Avatar asked Jan 17 '23 06:01

fredley


1 Answers

It should work the way you tried. But you can reference myProgram.exe as [#myProgram] (meaning myProgram is the Id of a File element). See the Formatted type description for more details.

like image 140
Yan Sklyarenko Avatar answered Feb 09 '23 01:02

Yan Sklyarenko