MSI和安装到程序文件 [英] MSI and Installing to Program Files

查看:98
本文介绍了MSI和安装到程序文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨...

我正在使用Visual Studio 2008 Pro创建一个基本的部署项目,以为我编写的C#应用​​程序创建安装程序.它所做的基本上就是安装exe和一些支持库(dll).

我目前正在xp下进行测试,并且一切正常,直到我尝试使用权限有限的用户在PC上进行安装.默认情况下,安装设置为安装到"Program Files",并且我知道需要管理权限",但是不是MSI掉下来或要求管理员权限,而是以一种快乐的方式进行,并随机选择了另一个驱动器(即使选择了Program Files),然后将所有文件安装到主硬盘D分区的根目录中,或者我什至看到它已安装到连接的拇指驱动器的根目录中.该程序实际上运行良好,但是我显然不希望将其安装到拇指驱动器或将我的所有文件随机放置在本地硬盘驱动器的根目录中.这是一个错误吗?如果安装程序(由于权限有限)无法安装到程序文件"中,则应该停止并显示错误或要求管理员权限"继续,而不仅仅是随机选择一些驱动器并在那里安装所有文件.当您通过双击运行MSI文件本身或运行生成的setup.exe文件时,会发生这种情况.
有谁知道在Visual Studio的部署项目部分中是否可以设置管理员权限"的要求.有没有其他人看到过这个功能",如果msi无法安装到Program Files,那么它将仅安装到任何地方?

无论如何,由于我感到困惑,任何帮助将不胜感激...

同样,对于MSI安装到Project Files的限制,我不了解的是,如果没有管理员权限的人有权手动写入Program Files文件夹,那么MSI为什么对安装到此目录设置了限制. MSI可以毫无问题地安装到任何其他位置,无论用户安装到C驱动器上的某个文件夹还是安装到程序文件,这都有什么区别.

Hi...

I am creating a basic Deployment Project using Visual Studio 2008 Pro to create an installer for the C# application I have written. All it does is basically install the exe and some supporting libraries (dlls).

I am currently testing under xp and everything works as expected until I try to install on a PC with a user that has limited privliges. The installation by default is set to install to "Program Files" and I understand that Admin Rights are required for this however instead of the MSI falling over or asking for admin rights it carries on its merry way and selects another drive at random (even though Program Files was selected) and just installs all the files to the root directory of say the D partition of the main harddrive or I have even see it install to the root directory of a connected thumb drive . The program actually runs fine however I obviously don''t want it installing to a thumb drive or placing all my files randomly on the root directory of a local harddrive. Is this a bug? Surely if the installer (because of limited priviliges) can''t install to Program Files should stop and display an error or ask for Admin Rights to continue not just select some drive at random and install all the files there. This happens when you run either the MSI file itself by double clicking it or if you run the generated setup.exe file.
Does anyone know in the deployment project part of Visual Studio whether you can set the requirement for Admin Rights. Has anyone else ever seen this "feature" where if the msi can''t install to Program Files then it just installs to whereever?

Anyway any help would be greatly appreciated as I am perplexed...

Also the thing I don''t understand regarding the restrictions of MSI installing to Project Files is if people without admin rights have access to manually write to the Program Files folder then why does MSI put in the restriction of installing to this directory. MSI installs to any other locations without issue, what difference does it make whether a user installs to some folder on C Drive or whether they install to Program Files.

推荐答案

实际上我们安装了一些.msi来调用一些无法直接访问的类库.假设在您的项目中,在您的PC上安装了某些Crystal报表后,当您要访问Crystal报表时,由于无法加载程序集类库而出现了错误,因此我们安装了.msi


可能会帮助您...................................通过Mohd.Muqtdeer
actually we install some .msi to call some class lybraries which not access directly. suppose that in your project some crystal report after having installed on your PC and when you want to acess crystal report then it gives an error for could not load assembly class library so we install .msi


may help you..........................By- Mohd.Muqtdeer


这篇关于MSI和安装到程序文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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