rods Posted March 5, 2010 Share Posted March 5, 2010 Hi, Does somebody has any example or description of how to enable/disable a local user account? Link to comment Share on other sites More sharing options...
PsaltyDS Posted March 5, 2010 Share Posted March 5, 2010 Search button broke? All seriousness aside, that one's been done to death, and it should be easy to find examples to try. 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 Link to comment Share on other sites More sharing options...
platypoos Posted March 6, 2010 Share Posted March 6, 2010 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. Link to comment Share on other sites More sharing options...
PsaltyDS Posted March 6, 2010 Share Posted March 6, 2010 (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) Edited March 6, 2010 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 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