WiX:Windows启动时如何注册要启动的应用程序? [英] WiX: How to register application to start when Windows launches?
本文介绍了WiX:Windows启动时如何注册要启动的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在探索使用WiX生成的MSI来分发.NET桌面应用程序。
I'm exploring distribution of .NET desktop applications with MSI generated by WiX.
到目前为止,它的运行效果很好。但是我有几个问题,谷歌搜索无法解决。
So far it works great. But I've got a few questions, googling can't help out with.
在Windows启动时注册应用程序启动的建议方式是什么(在WiX中)?
我可以使用什么WixUI以及如何使用?
What WixUI could I use and how?
注意:
- 该应用程序不是Windows服务,因此不应进行注册。
- 最好让用户可以在设置过程中禁用该选项。
谢谢!
推荐答案
我使用Google找到了它(提供通过注册表自动启动程序);它还包括添加UI。别忘了,您还应该在设置之外提供一个选项来启用/禁用自动启动。
I found this using Google (Providing automatic program start via the Registry); it also includes adding UI. Don't forget you should also provide an option outside the setup to enable/disable autostart.
它的基本Wix是:
<Property Id="ASSISTANCE_START_VIA_REGISTRY">1</Property>
<!-- Auto-start via Registry -->
<Component Id="MerliniAssistanceAutostart" Guid="Place-your-own-GUID-here">
<RegistryValue Id="MerAs.rst" Root="HKMU" Action="write"
Key="Software\Microsoft\Windows\CurrentVersion\Run"
Name="Merlinia Assistance Client"
Value="[INSTALLDIR]Assistance.exe"
Type="string" />
<Condition>ASSISTANCE_START_VIA_REGISTRY</Condition>
</Component>
<ComponentRef Id="MerliniaAssistanceAutostart" />
这篇关于WiX:Windows启动时如何注册要启动的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文