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 启动时启动?
基础教程推荐
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
