如何在每台计算机安装中创建每用户启动文件夹快捷方式?
我正在使用 WiX 3 为所有用户安装应用程序(属性 ALLUSERS=1)。我想在当前用户的启动文件夹中创建应用程序的快捷方式。如何仅覆盖我的启动文件夹快捷方式的 ALLUSERS=1?
我正在使用 WiX 快捷方式元素:
<Shortcut Id="MyAppShortcut" Directory="StartupFolder" ... />
但由于每台计算机的安装,“StartupFolder”解析为“所有用户”启动文件夹。
有什么建议吗?
I am installing an application using WiX 3 for all users (property ALLUSERS=1). I would like to create a shortcut to my application in the current user's Startup folder. How can I override the ALLUSERS=1 for my Startup folder shortcut only?
I am using the WiX Shortcut element:
<Shortcut Id="MyAppShortcut" Directory="StartupFolder" ... />
but the "StartupFolder" resolves to the 'All Users' Startup folder because of the per-machine installation.
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
仅为当前用户安装快捷方式似乎不是一个好主意:如果我在仅用于管理任务(例如安装软件)的帐户下安装您的软件会怎样?因为我尝试遵循最佳实践和 不要以管理员身份运行!
如果您尝试在整个系统的后台运行该软件的单个实例,那么您可能应该将您的软件编写为 Windows 服务,而不是创建启动快捷方式。 Wix 支持安装服务。
如果您希望 UI 组件配置/管理托盘中的服务,那么您仍然可以将单独可执行文件的快捷方式安装到所有用户启动文件夹中。这样,所有用户都可以与服务交互,但服务本身仅启动一次。
Installing the shortcut only for the current user doesn't seem like a good idea: what if I install your software under an account I only use for administrative tasks such as installing software? Because I try to follow best practices and Don't Run as Administrator!
If you're trying to run a single instance of the software in the background for the whole system, then you probably should write your software as a Windows Service instead of creating startup shortcuts. Wix has support for installing a service.
If you want a UI component to configure/manage the service to live in the tray, then you can then still install a shortcut for a separate executable to the All Users start up folder. That way all users can interact with the service, but the service itself is launched only once.