Run As Administrator commands with script?
Hello, Is there a way to run command in Windows 7 Enterprise in the Run as Administrator mode so that username and password are automatically set? I need to configure netsh setting (globalautotuninglevel) for several computers and I would like to do it with logonscript or Group Policy. If I just try to run "netsh interface tcp set global autotuninglevel=disabled" I get error message regarding Administrator level credentials (Even if I am logged to PC as Domain admins member) Is there a way to paste password to runas batchfile command? And yes I know this is not according to best security practices... Thanks!
January 19th, 2011 2:37am

I believe you could use a Startup Script for this netsh command. Does that Netsh command apply a change at the computer level (In HKLM within the registry) or at a user level (HKCU) The startup script runs as the LocalSystem account and would have the appropriate permissions. Startup Scripts can be set in Computer Config > Windows Settings > Scripts > Startup RegardsLee Bowman MCITP MCTS
Free Windows Admin Tool Kit Click here and download it now
January 19th, 2011 11:41am

Log on script and group policies are running with a full privilege token. Therefore you do not need to worry about it. Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
January 21st, 2011 2:15am

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

Other recent topics Other recent topics