使用OOTB方式在运行VS2010 Installer MSI之前检查管理员权限? [英] OOTB way to check for admin permissions before running VS2010 Installer MSI?

查看:137
本文介绍了使用OOTB方式在运行VS2010 Installer MSI之前检查管理员权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为XP-Win7上的IE7-9中运行的第3方ActiveX DLL创建安装程序。 MSI应该执行以下操作:


  1. 检查管理员权限。通知用户并在权限不足时退出。

  2. 检查以前的版本。如果存在,请注销或覆盖它。

  3. 使用vsdrfCOM安装DLL,以便在IE附加菜单中识别它。

对于(3),我设置了vsdrfCOM,但它似乎没有用。我看不到OOTB来执行(1)或(2)的方法。



谢谢。

解决方案

< blockquote>

检查管理员权限。通知用户并在
权限不足的情况下退出。


由于Windows UAC在较新版本上的工作方式,因此并未真正支持此操作。 Windows版本。基本上,任何用户都可以通过提升成为管理员。同样,除非管理员提升权限,否则他们甚至都不具有完全特权。



解决方案是确定安装类型(按用户或按计算机),然后让Windows Installer处理权限和提升权限。


检查以前的版本。如果存在,请注销或覆盖它。


使用重大升级



< blockquote>

使用vsdrfCOM安装DLL,以便在IE
附加菜单中识别它。


我认为这还不够。安装过程应该像手动注册文件一样注册文件。



经验法则是首先手动安装应用程序(复制/粘贴,执行注册命令行)等等。)。只有这样,您才能成功配置一个自动执行的安装程序。


I'm creating an installer for a 3rd Party ActiveX DLL running in IE7-9 on XP-Win7. The MSI should perform the following:

  1. Check for admin permissions. Notify the user and exit if insufficient permissions.
  2. Check for previous version. If it exists unregister or overwrite it.
  3. Install the DLL with vsdrfCOM so that it is recognized in the IE add-on menu.

For (3), I set the vsdrfCOM but it didn't seem to work. I don't see an OOTB way to perform (1) or (2). Is that correct or is there an OOTB way?

Thanks.

解决方案

Check for admin permissions. Notify the user and exit if insufficient permissions.

This is not really supported because of the way Windows UAC works on newer Windows versions. Basically, any user can become an Administrator through elevation. Also, even Administrators don't have full privileges unless they elevate.

The solution is to decide on an installation type (per-user or per-machine) and let Windows Installer handle permissions and elevation.

Check for previous version. If it exists unregister or overwrite it.

This is done automatically when using major upgrades.

Install the DLL with vsdrfCOM so that it is recognized in the IE add-on menu.

I don't think this is enough. The installation process should register your files just like you would register them manually.

A rule of thumb is to first install your application manually (copy/paste, execute register command lines etc.). Only then you will be able to successfully configure an installer which does it automatically.

这篇关于使用OOTB方式在运行VS2010 Installer MSI之前检查管理员权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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