Click here to Skip to main content
15,790,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

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.

1 solution

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
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900