Guest emergent Posted August 9, 2005 Share Posted August 9, 2005 (edited) I am quite new at this scripting thing. I was wondering if someone could tell me how to write a script that will allow me run a saved mmc named "Admin.msc" under WinXP SP2 using a different username and password on an AD domain. Example: I want to run "c:\Admin.msc" as "domain\administrator" using password "xxxxxxxxx" I cannot figure out how I need to write this as I know nothing about windows scripting other than basic batch files. I also want to compile it so that the password is not in clear text. That is why i want to us AutoIt. Edited August 9, 2005 by emergent Link to comment Share on other sites More sharing options...
hgeras Posted August 9, 2005 Share Posted August 9, 2005 (edited) Your command is RunAsSet and you will use it like this: RunAsSet ( "user", "domain", "password") RunWait(@SystemDir & "\mmc.exe C:\admin.msc") RunAsSet();<-- To restore initial account AutoIt has a wonderful help file.Bother to read it please before posting cos that wasnt something difficult as you can see. Be sure to download the SCiTe editor.And you can easily compile it from there after you have tested your script on the fly as many times as you want. C ya Edited August 9, 2005 by hgeras Useful information about COM/Objects referenceMy Scripts:PapDefragNvidia Temperature Logger V3.0 with graph analyzerAutoiIt Update Checker And Downloader V1.0ArrayPush UDF 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