我使用Wix安装程序,安装完成后安装所有文件,我希望命令提示符安装服务。我正在使用这个元素块:
<CustomAction Id="InstallTPG_API" Directory="TPG_API_INSTALLFOLDER"
ExeCommand="nssm install TPG_API "C:\Program Files (x86)\Foxpaw\TPG_Foxpaw\TPG_API\TPG_API.exe""
Execute="deferred" Return="ignore">
</CustomAction>
但是,该服务未安装。我甚至都看不到命令提示窗口。我做错了什么?
答案 0 :(得分:0)
我明白了。我做了以下更改后,它起作用了:
<!-- After files are finished installing, intall and start the TPG_API service-->
<CustomAction Id="InstallTPG_API" Directory="TPG_API_INSTALLFOLDER" ExeCommand="[SystemFolder]cmd.exe /c nssm install TPG_API "C:\Program Files (x86)\Foxpaw\TPG_Foxpaw\TPG_API\TPG_API.exe"" Execute="immediate" Return="ignore" />
<CustomAction Id="StartTPG_API" Directory="TARGETDIR" ExeCommand="[SystemFolder]cmd.exe /c net start TPG_API" />
<InstallExecuteSequence>
<RemoveExistingProducts Before="InstallInitialize" />
<Custom Action="InstallTPG_API" After="InstallFinalize" />
<Custom Action="StartTPG_API" After="InstallTPG_API" />
</InstallExecuteSequence>