Run program as admin

kitkat12012

Distinguished
Nov 12, 2010
85
0
18,640
I have this Win7 security dilemma and I was wondering if you guys can shed some light :D

I need to give a standard user (non-admin user) rights to run a program that requires admin rights, without giving the said user actual admin rights or disabling the uac. This particular program starts/stops services so I would probably also need this user to be able to do so.



Basically I'm trying to install an AMP stack (apache, mysql, php) for a standard user, but he is unable to use it because the stack requires admin rights to start/stop the apache and mysql services. And I don't wanna give this user admin privileges just to be able to use this program.


The program is installed on the C: root and I've already given this user directory read/write/execute to the programs directory. I can confirm that this works since the user can read or modify the files within this directory.


I have tried the Task Scheduler run as admin trick but it runs the program under the admin's desktop and not the current user's desktop
http://www.howtogeek.com/howto/windows-vista/create-administrator-mode-shortcuts-without-uac-prompts-in-windows-vista/


I also tried the MS Application Compatibility uac "bypass" trick which does let the user run the program but refuses to start the required services for the lack of admin rights
http://www.ghacks.net/2010/07/08/get-rid-of-uac-prompts-with-microsofts-application-compatibility-toolkit/



Any other suggestions on how to pull this off?

Thanks
 
Solution
Hi,
You may also need to look at any dependencies associated with the services, and add the admin permissions to these services as well
Thanks,
PD

peterdigby

Distinguished
Dec 3, 2010
46
0
18,540
Hi,
May want to try changing the account used for the actual service.
Open the services console on the local PC, right click on the service the user will need to start.
Select properties, and under the logon tab, enter an admin level username and password.
This should allow the end user to restart the service; but it will use the admin level permissions.
Hope this helps,
PD
 

kitkat12012

Distinguished
Nov 12, 2010
85
0
18,640



i tried this but it does not seem to work


i'll try playing around with this idea a bit more then, thanks
 

kitkat12012

Distinguished
Nov 12, 2010
85
0
18,640



good point

I'll check that out, thanks
 

steelev3

Honorable
Jan 31, 2013
1
0
10,510
The following will allow a program that requires admin rights to run by saving the admin credentials:

1. Create a normal Short-Cut to application.exe on the desktop.
2. Right-click the short-cut and select Properties.
3. In the Target box, insert the following before the path to application.exe: "runas /savecred /user:administrator ".
4. Double-click the new short-cut, and enter the administrator password.
 

Hikmet_1

Reputable
Oct 14, 2015
2
0
4,510
There is a new portable freeware - RunAsTool v1.0
Allows standard users run a specific program with administrator privileges without the need to enter the administrator password each time , very easy to use - you can easily drag and drop any program/s to give it/them Administrator privileges ,Standart Users can create Application shotrcuts too

http://www.sordum.org/8727/runastool-v1-0/