New User Account

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
BobDDstryr
Junior Coder
Posts: 38
Joined: Fri Oct 22, 2010 2:47 am

New User Account

Post by BobDDstryr » Fri Feb 11, 2011 9:11 pm

So I have a machine with an account with a password, and its set to auto-login to that account. I'm working on a script that does a number of things, including creating a new account that I would then like to be able to log into by default. Normally for this I use the command:

control userpasswords2

However, when trying to do this with macro scheduler, when the window pops up asking me to enter and confirm the password that I'd like to use to auto-login to the new account.. macro scheduler stops working. It's like the new window has a higher priority than macro scheduler - the script just waits until that window is closed - and then picks up running agian. Also - if I'm running a script, and that window is open and I switch to the macro scheduler window it pops up with "Not responding." It starts responding again when I manually close the password window. Interestingly if I go to that window while NOT running a script, I can switch to the macro scheduler window, and it still responds.

So I guess what I'm asking is.. is there any way to "up" macro scheduler's priority so that it will still work in this situation? If not, is there any way to just send a command telling it what account and password to auto-login to through a different method?

BobDDstryr
Junior Coder
Posts: 38
Joined: Fri Oct 22, 2010 2:47 am

Post by BobDDstryr » Sat Feb 12, 2011 12:06 am

Realized that maybe a code sample could help further explain what I'm seeing.
The default user is Test with password test1, and it is using control userpasswords2 I have already set the machine up to log into this account using that password on boot.
I've just added a new user, dTest with password dTest1 - and now want to use the control userpasswords2 command to set it to log into dTest the next time it reboots.

let>ww_timeout=20
run>control userpasswords2
waitwindowopen>User Accounts
ifwindowopen>User Accounts
else
let>MACRO_RESULT=FAIL
goto End
endif
wait>1

setfocus>User Accounts
pushbutton>User Accounts,Users must &enter a username and password to use this computer.
wait>1
pushButton>User Accounts,&Apply
wait>1
press>tab
wait>1
release>tab
wait>1
send>d
wait>1
pushButton>User Accounts,Users must &enter a user name and password to use this computer.
wait>1
pushButton>User Accounts,&Apply

wait>1
messagemodal>blaarg


So - upon hitting the second "Apply" a box pops up for "Automatically Log on" with fields for the username, password, and confirm password. And at this point, nothing after that pushButton command will run until I close the window - so in this example blaarg won't come up, even if you wait several minutes. But then upon closing that window, it waits a second, and then outputs blaarg.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts