Service 首先使用my.cfg运行记事本,然后才启动服务

Service 首先使用my.cfg运行记事本,然后才启动服务,service,wix,Service,Wix,我随应用程序一起安装: 1根据需要启动和停止我的应用程序的服务 2一个实际包含用户数据的conf文件,该文件将显示给用户,以便根据需要进行修改。在安装过程中,我通过使用我的conf文件运行notepad.exe,让用户有机会对其进行更改 问题是,在我的代码中,我安装的服务在用户有机会修改conf文件之前启动。我想要的是: 1首先,用户有机会更改conf文件并使用conf文件运行notepad.exe 2只有在之后才能启动服务 <Component Id="MyService.exe" Gu

我随应用程序一起安装: 1根据需要启动和停止我的应用程序的服务 2一个实际包含用户数据的conf文件,该文件将显示给用户,以便根据需要进行修改。在安装过程中,我通过使用我的conf文件运行notepad.exe,让用户有机会对其进行更改

问题是,在我的代码中,我安装的服务在用户有机会修改conf文件之前启动。我想要的是: 1首先,用户有机会更改conf文件并使用conf文件运行notepad.exe 2只有在之后才能启动服务

<Component Id="MyService.exe" Guid="GUID">   
 <File Id="MyService.exe" Source="MyService.exe" Name="MyService.exe" KeyPath="yes" Checksum="yes" />  
 <ServiceInstall Id='ServiceInstall' DisplayName='MyService' Name='MyService' ErrorControl='normal' Start='auto' Type='ownProcess' Vital='yes'/>  
 <ServiceControl Id='ServiceControl' Name='MyService' Start='install' Stop='both' Remove='uninstall'/>  
</Component>  

<Component Id="my.conf" Guid="" NeverOverwrite="yes">  
 <File Id="my.cfg" Source="my.cfg_template" Name="my.cfg" KeyPath="yes" />  
</Component>  

[...]  

<Property Id="NOTEPAD">Notepad.exe</Property>  
<CustomAction Id="LaunchConfFile" Property="NOTEPAD" ExeCommand="[INSTALLDIR]my.cfg" Return="ignore" Impersonate="no" Execute="deferred"/>  
<!--Run only on installs-->  
<InstallExecuteSequence>  
 <Custom Action='LaunchConfFile' Before='InstallFinalize'>(NOT Installed) AND (NOT UPGRADINGPRODUCTCODE)</Custom>  
</InstallExecuteSequence>  

我在上面的代码中做错了什么?我如何修改它以实现我所需要的?首先用我的配置文件运行记事本,然后启动服务

我将扩展MSI UI以请求用户需要修改的部分,然后使用XmlFile和XmlConfig元素更新文本文件。然后Windows installer可以过来启动服务。

谢谢您的回答。同时,我还发现了一些东西:我可以在StartServices未安装且升级产品代码似乎不起作用之前安排定制操作。