简体   繁体   English

必须在Windows 7中为msi提示UAC

[英]Have to prompt UAC in windows 7 for msi

I am trying to create an Installation package (MSI) using the Microsoft setup project which requires admin privileges. 我正在尝试使用需要管理员权限的Microsoft安装项目创建安装包(MSI)。

On Windows 7, the UAC prompt does not show up. 在Windows 7上,UAC提示符不会显示。 Message window says need admin permissions. 消息窗口说需要管理员权限。

How to make Windows 7 prompt UAC for a non-privileged user? 如何让Windows 7为非特权用户提示UAC?

When a non-privileged user on windows 10 tries to install the MSI, it automatically prompts the UAC window. 当Windows 10上的非特权用户尝试安装MSI时,它会自动提示UAC窗口。

Set the Package element's InstallPrivileges attribute to elevated . Package元素的InstallPrivileges属性设置为elevated Or better, if you're creating a per-machine package, set the Package element's InstallScope attribute to perMachine and it will do the right thing for you. 或者更好的是,如果您正在创建每个计算机程序包,请将Package元素的InstallScope属性设置为perMachine ,它将为您做正确的事情。

<Product ...>
  <Package InstallScope='perMachine' />

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM