6

Is there a way to configure an application to run as administrator all the time. I tried with the compatibility administrator utility but seems to work only for windows Vista and above.

The application is crashing because of some printer drivers that need admin rights.

EDIT: The application name is Zeh Raster and it's on Windows XP I would like not to provide the password each time that I need to run the app.

3
  • Is this not the right place to ask this? Why the down votes? Jul 2, 2013 at 17:09
  • There isn't enough information, such as what operating system you're running or what program you're trying to run.
    – Taegost
    Jul 2, 2013 at 17:10
  • 2
    The question is tagged Windows-XP. The application name is Zeh Raster Jul 2, 2013 at 17:11

3 Answers 3

6

You can use the runas.exe command to create a shortcut that launches with admin rights. Basically, make a new shortcut with the target:

runas.exe /user:administrator c:\path\to\program.exe
3
  • I was aware of this, but I would like not to have to provide the password each time they want to run the app. This is an enterprise environment. I updated my question Jul 2, 2013 at 17:33
  • 2
    @tou, did you try the /savecred switch ?
    – Ofiris
    Jul 2, 2013 at 17:43
  • this /savecred works for me, even, at restart still working! how reset this password? For example, if I change the admin password? Apr 27, 2016 at 19:57
1

Regardless what method you are using (at least for those I know), there will always be a way for malicious users to abuse it and run a different program with your administrator account. Therefore, if you have untrusted tech-savvy users, try to lock down the administrator account you use as good as possible (or if possible, tweak the locations where your program wants to write to so that non-admins can write there and the program works without admin privs; use ProcMon to find them).

  • CPAU can be used to store a program with credentials in an encrypted file and re-run the program with the credentials without user interaction (e. g. from a shortcut)
  • There is a program called Win-SUDO that claims to emulate SUDO for Windows - but in fact it also only stores the credentials encrypted in the registry at a location that is readable by the users who may use Win-SUDO.
  • Saving the credentials with the runas command with savecred works too, but you can run other programs as admin this way as well.
  • You can also create a "scheduled" task that is scheduled to run never and runs with the credentials of the user, and launch it manually when needed; this method also stores the credentials of the user that is supposed to run the task, but unlike runas command it is not that easy to reuse the credentials for different processes. Note that it is not possible to run an interactive process that way on Windows XP (or at least you cannot interact with it).

Anyway, the correct solution is to either try to get the original program running without admin privileges, or run it as a service in the background in case no user interaction is required. Or try to get the vendor to provide a fixed version that works without admin privileges or uses a service for those parts that need them.

0

This is an old question but since it's getting quite popular, I wanted to post what I ended up doing.

My workaround was to develop a windows service that runs with admin rights. Then, I wrote a launcher app that sends a request to this service to open the application I needed to run with admin rights. I might have killed flies with cannon balls, but it worked. The end users don't have to be admins on their machines and they have a shortcut on their desktops that can click anytime they want. I also made an msi installer for this service that can be administered easier by the IT folks.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .