12

I've created an MSI windows installer that installs a plug-in which I wrote for a piece of software used at my office. However, a number of users here don't have admin rights to their computers, and IT is getting frustrated having to install the plug-in for them.

My installer does nothing but copy a couple files, to locations that the users would otherwise have access to copy files to. Is there some way to modify my Setup project so that the resulting MSI does not require administrator rights?

Eric Anastas
  • 21,675
  • 38
  • 142
  • 236
  • Duplicate of http://stackoverflow.com/questions/73305/how-do-we-create-an-installer-than-doesnt-require-administrator-permissions – Adrian Nov 11 '10 at 17:51

2 Answers2

6

I don't have a setup to test this on at the moment, but assuming Wix, in the Package element, try setting InstallPrivileges='limited' and InstallScope='perUser'.

That said, if all you really need to do is copy some files, considered using a simple batch script instead.

chezy525
  • 4,025
  • 6
  • 28
  • 41
  • Yeah we were using a batch file before, but I'm just using this as a learning exercise. – Eric Anastas Nov 12 '10 at 00:32
  • I'm using the Setup project from inside Visual Studio 2010. I don't think this is the same as Wix correct? – Eric Anastas Nov 15 '10 at 20:19
  • Sorry, after a bit a research, it seems you're correct: VS2010 doesn't ship with Wix (I use SharpDevelop). If you're just learning, I'd suggest Wix (personal preference). The VS package is called Votive. I apologize for any confusion I caused you! – chezy525 Nov 15 '10 at 21:42
4

There's two approaches here:

1) Create an installer that doesn't require Admin privs because it doesn't install anything that needs it. If you can really do this, you might want to consider a ClickOnce installation and see if it meets your needs.

2) Educate your IT department on how to drop your MSI onto a network share and publish it through Group Policy. This way the users can go to Add/Remove programs and initial the installation but have it run elevated without a SysAdmin having to walk from desk to desk doing it by hand. ( I'm kind of suprised they don't already know how to do that. )

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • How do I create an installer that does not require admin privs? My current installer creates a folder in Program Files and copies files to it. It also writes a file to a sub folder of appdata. Do these actions require admin privileges? Also my program is a plug-in (DLL) not a stand alone application. So I don't get a Publish option when I right click on the project. – Eric Anastas Nov 15 '10 at 20:18
  • You either utilize the managed /elevated installation pattern or you design your application to install only resources that don't require admin privs. The locations you mentioned require Admin Privs. – Christopher Painter Nov 15 '10 at 20:40