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 是:
The basic Wix for it is:
<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="SoftwareMicrosoftWindowsCurrentVersionRun"
Name="Merlinia Assistance Client"
Value="[INSTALLDIR]Assistance.exe"
Type="string" />
<Condition>ASSISTANCE_START_VIA_REGISTRY</Condition>
</Component>
<ComponentRef Id="MerliniaAssistanceAutostart" />
这篇关于WiX:如何注册应用程序以在 Windows 启动时启动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:WiX:如何注册应用程序以在 Windows 启动时启动?
基础教程推荐
- Moq It.Is<>不匹配 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- WPF 模态进度窗口 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
