Link to home
Start Free TrialLog in
Avatar of got_snacks
got_snacks

asked on

RUN AS COMMAND in BATCH FILE

I have reg. change I would like to make Via a bat file that runs when a user logs in. The bat file runs fine under admin log in, but when I try to run it as a limited user it tells me that Registry Editing has been disabled by the administrator, this is correct, we have this set by Group Policy.

What I need is a command that will allow a limited user to run the registry change without them knowing it.

Such as a RUNAS command. Trick is it has to be done via a BAT file and not a VBS script
Avatar of Fiuca
Fiuca
Flag of United States of America image

runas /noprofile /user:mydomain\myadminusername "mmc %SystemRoot%\system32\compmgmt.msc /s"

This example will bring up the Computer Management console, normally launched from Administrative Tools All of the control panel applets exist under %SystemRoot%\system32\ (typically c:\windows\system32) and they all have the .msc extension.

If you are not on a Windows domain, replace the mydomain part with your computer name.
Avatar of got_snacks
got_snacks

ASKER

Fiuca:

Thank you for he help, the only problem is that it still ask me for the password of the user account that I specified in the script, do you have any suggestions for this problem
ASKER CERTIFIED SOLUTION
Avatar of Fiuca
Fiuca
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Final Solution did not work