如何在 Windows 10 上使用 WiX 使程序在启动时(以管理员身份)运行 [英] How to make a program run at startup (as admin) with WiX on Windows 10

查看:54
本文介绍了如何在 Windows 10 上使用 WiX 使程序在启动时(以管理员身份)运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以告诉我如何正确安装此程序以在使用 WiX 的 Windows 10 上启动时以管理员权限运行吗?

Can someone tell me how to properly install this program to run with admin privileges at startup on Windows 10 using WiX?

我通过 Google 看到的所有帮助都是旧的,说要使用 Startup 文件夹.现在,虽然 Startup 文件夹似乎仍然有效,但我认为这不再是首选方法.

All the help I've seen via Google has been old ones saying to use the Startup folder. Now, although the Startup folder still seems to work, I don't think it's the preferred way to do it anymore.

我还需要考虑以管理员身份运行的需要在过程中增加了一个问题.

I also need think the need to run as admin adds a wrinkle in the process.

推荐答案

请求或要求 admin 的程序是 EXE 而非 WiX 的功能.应显示 EXE 以请求提升.

A program requesting or requiring admin is a function of the EXE not WiX. The EXE should be manifested to request elevation.

MSFT 表示在启动请求管理中设置内容不是最佳做法.这是一种糟糕的用户体验.

MSFT has said it is not a best practice to have things in startup request admin. It's a horrible user experience.

更好的方法是按照您在评论中所说的去做.将组件作为服务运行,非私有 UI 可以与之通信.

The better approach is to do what you said you do in your comment. Have a component running as a service that the non-priv UI can communicate with.

这篇关于如何在 Windows 10 上使用 WiX 使程序在启动时(以管理员身份)运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆