How can i run a bat file with elevated privileges in windows 7?

hi all,

anyone could help me....

i need run a .bat file (launched from polices of AD windows 2003) with a standard user (no-admin in windows 7 clients), the police is OK, but i received a message:

the operation require elevated privileges

i use command runas, but this work only for windows XP systems.

anyone knwo how i can run a .bat file with elevated privileges with a standar user for windows 7 systems? without disabled UAC

thanks for all.

 

December 29th, 2010 10:10pm

Do you mean that the batch file is configured in a GPO as a logon script? If it is a startup script, it should run with system privileges. Rather than use a logon script for tasks that require administrator privileges, I either use a startup script, or run the task remotely in bulk myself. I don't like putting credentials in logon scripts.

Richard Mueller

Free Windows Admin Tool Kit Click here and download it now
December 29th, 2010 10:20pm

yes, el batch file is configured in a GPO, and this run with admin privileges, i use lsrunase command to encript password for admin user, but lsrunase dont start script with elevated privileges.

anyone...

how can i run or start  a batch file from command lline in windows 7 with elevated privileges without promt UAC confirmation?

runas command function OK for Windows XP systems, but no for windows 7..

thanks

December 29th, 2010 11:02pm

how can i run or start  a batch file from command lline in windows 7 with elevated privileges without promt UAC confirmation?

The short answer is "you can't."

Here is the long answer:

http://blogs.msdn.com/b/aaron_margosis/archive/2007/06/29/faq-why-can-t-i-bypass-the-uac-prompt.aspx

HTH,

Bill

Free Windows Admin Tool Kit Click here and download it now
December 29th, 2010 11:37pm

anyone knwo(?) how i can run a .bat file with elevated privileges with a standar(?) user for windows 7 systems? without disabled UAC

It is possible (but rather complex) to do it for an admin user but not for a standard user.
December 30th, 2010 1:37am

http://www.winability.com/elevate/

They have a file that runs on 32 and 64. Put it in the C:\Windows directory and run it before the comannd.

Free Windows Admin Tool Kit Click here and download it now
July 25th, 2013 4:37pm

That program (I also wrote one) merely provokes the UAC prompt; it does not bypass it.

The answer is still "You cannot bypass the UAC prompt."

Bill

July 25th, 2013 4:44pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics