如何正确创建msi(Windows安装程序文件)以获取访问权限? [英] How can I create msi (windows installer file) correctly for access rights?

查看:301
本文介绍了如何正确创建msi(Windows安装程序文件)以获取访问权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!



我有:

0.简单的HelloWorld.exe应用程序。应用程序不需要管理员权限。

1.安装HelloWorld的Visual Studio 2008 Pro安装项目。



现状:

0.运行msi

1.如果安装目录是Program Files \ Example - 在创建目录和复制exe之前,UAC对话框处于活动状态;

2.如果安装目录是User \Desktop \ Example - 在创建目录和复制exe之前,UAC对话框处于活动状态;



问题:

为什么是windows安装程序是在桌面上创建目录时的升级权限吗?



我需要:

仅当需要安装目录的管理员权限时才显示UAC对话框。 br />
有可能吗?



谢谢。

Hello!

I have:
0. Simple HelloWorld.exe application. Application does not need admin rights.
1. Visual Studio 2008 Pro Setup project which install HelloWorld.

Current situation:
0. Run msi
1. If install directory is Program Files\Example - UAC dialog is active before create dir and copy exe;
2. If install directory is User\Desktop\Example - UAC dialog is active before create dir and copy exe;

Question:
Why windows installer is upgrating rights when create directory on desktop?

I need:
Show UAC dialog only if need admin rights for install directory.
Is it possible?

Thank you.

推荐答案

我不得不不久前这样做了。您需要在属性选项卡中将
I had to do this a little while ago. You need to change in your properties tab the
InstallPrivileges='limited'

更改为

InstallScope='perUser'

这将做什么是否总是需要管理员权限才能启动。因此,当您运行程序时,您将显示该管理员对话框。

What this will do is it will always need admin rights to launch. So you will get that admin dialog to show up when you run the program.


Finded:



http:// practicalfish .com / blog / deployment / msi-remove-uac /



谢谢
Finded:

http://practicalfish.com/blog/deployment/msi-remove-uac/

thanks


这篇关于如何正确创建msi(Windows安装程序文件)以获取访问权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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