Jump to content

Recommended Posts

Guest emergent
Posted (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 by emergent
Posted (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 by hgeras

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...