mega128 Posted December 30, 2005 Share Posted December 30, 2005 Hi all, I am trying to run a vbscript as local administrator account? I wrote this but I am sure that this is not the best way to do it. Is there anyway to run this while cmd is hidden. Also, I don't this this code even is running as local admin account when pointer goes to cmd. Please help. Thanks all for reading! RunAsSet("local_admin_account",@ComputerName,"password") RunWait("cmd") send("C:\temp\test.vbs") RunAsSet() Link to comment Share on other sites More sharing options...
seandisanti Posted December 30, 2005 Share Posted December 30, 2005 Hi all, I am trying to run a vbscript as local administrator account? I wrote this but I am sure that this is not the best way to do it. Is there anyway to run this while cmd is hidden. Also, I don't this this code even is running as local admin account when pointer goes to cmd. Please help. Thanks all for reading! RunAsSet("local_admin_account",@ComputerName,"password") RunWait("cmd") send("C:\temp\test.vbs") RunAsSet() well the thing is, it runs cmd as admin, but that is the only run() that is called as admin. The thing is, the vbs is actually being run by WScript.exe. so you may want to try.... RunAsSet("local_admin_account",@ComputerName,"password") RunWait("WScript.exe c:\temp\test.vbs") Link to comment Share on other sites More sharing options...
mega128 Posted December 31, 2005 Author Share Posted December 31, 2005 cameronsdad, Thank you so much it worked like charm. Thanks again, Mega128 Link to comment Share on other sites More sharing options...
seandisanti Posted January 3, 2006 Share Posted January 3, 2006 cameronsdad, Thank you so much it worked like charm.Thanks again,Mega128 glad i could help 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