Bad boy Warrior Posted October 26, 2006 Share Posted October 26, 2006 Im trying to create a RunAs script which is used for future scripts for standard (non admin) users. So if i create a script i dont need to tie the runas portion to the script i want running (i know i asked something similar like this few weeks back but i think itll be worth knowing how to do)So heres the scriptset WshShell = CreateObject("WScript.Shell")WshShell.Run "runas /user:administrator@domain" "cscript.exe \\server\share$\Script.vbs"""WScript.Sleep 100WshShell.Sendkeys "Password~"To me this looks corect but can anyone give me their opinions if this is incorrect or a security risk somewhere?Is it possible to run batch files with this script too if so how if not how could i allow standard users to run certain .bat scripts when some methods coudl be tied down by policy?Cheers Link to comment Share on other sites More sharing options...
allen2 Posted October 26, 2006 Share Posted October 26, 2006 If you 're going to use a gpo, you should be able to make what you without specifying the password in a plain text file. IE: when you're using startup script in the computer policy, the script will run with local system account so it will have all local rights. Link to comment Share on other sites More sharing options...
Bad boy Warrior Posted October 30, 2006 Author Share Posted October 30, 2006 Yes but would this bypass some normal users policy for making certain changes? One of the things we need to do i emove the Accessories folder from all users. I managed to do this with all new users that are created in the machine but if this script runs as the user it fails - something where it gives them access then removes the access..... Link to comment Share on other sites More sharing options...
jpatto Posted November 2, 2006 Share Posted November 2, 2006 maybe wrong but doesnt this line has 2 extra " ? shouldnt it be"runas /user:administrator@domain" "cscript.exe \\server\share$\Script.vbs"just a guess Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now