Wix Shortcut Arguments Issues
I have a strange issue with Wix
I'm creating a shortcut to a config tool for a windows service.
I want to pass the config file for the windows service as an argument to the config tool.
Thus I have a component that installs the windows service, this works fine and another one that installs the config tool.
The shortcut code is below:
<Shortcut Id="LaunchConfigTool" WorkingDirectory="WINDOWSSERVICE" Arguments="[#fil21620445E80831C7F56986614D268A22]"
Name="Service Configuration Tool" Directory="ProgramMenuDir" Advertise="yes"/>
</File>
This does not work, namely, the shortcut fails to launch the config tool. However, the snippet below works fine. Needless to say that the reference above refers to service.exe.config.
<Shortcut Id="LaunchConfigTool" WorkingDirectory="WINDOWSSERVICE" Arguments="service.exe.config"
Name="Service Configuration Tool" Directory="ProgramMenuDir" Advertise="yes"/>
</File>
I logged the installer actions to a file and both have the following output
MSI (s) (BC:1C) [11:32:27:947]: Executing op: ShortcutCreate(Name=tcet7-ht|Service Configuration Tool,Feature=ProductFeature,Component={B9ED30DE-087D-393E-950B-C67877E51B8A}[~]2,,Arguments=C:\Program Files\Housekeeping\Windows Service\service.exe.config,WorkingDir=C:\Program Files\Housekeeping\Windows Service\,,,,,,,,,)
Any ideas with the reference is not working?
TI开发者_如何学JAVAA
Try enclosing the argument in quotes:
Arguments=""[#fil21620445E80831C7F56986614D268A22]""
During installation your argument will be resolved to a path which may contain spaces. This type of paths need to be enclosed in quotes in order to be recognized correctly.
精彩评论