Jump to content

Recommended Posts

Posted

run("cmd")

sleep(150)

send("net user USERNAME /active:no)

sleep(150)

send("{enter}")

sleep(250)

send("exit")

send("{enter}")

exit

IF you want to make the username active put yes on the 3rd line.

Posted (edited)

@platypoos: Knock that off. No more examples involving Send() with a CMD console. It's poor usage, bad practice, and shouldn't be spread around. You can do better.

If you want to run that, then:

$sUserName = "YourUserName"
$sActive = "NO" ; use "NO" or "YES"
$iRET = RunWait("NET USER " & $sUserName & " ACTIVE:" & $sActive)
MsgBox(64, "Done", "Return code = " & $iRET)

:mellow:

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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
×
×
  • Create New...