I have a repetitive testing task I need to do, which I'm hoping to automate. Unfortunately, part of the testing procedure involves creating a new Windows user account, then logging in as the new account to continue testing. I'm fairly sure I can create the new account, but I can't find a way to automate changing user and continuing execution of a bat script. I've found the tsdiscon
and tscon
commands for quickly switching user, but as I understand it, tscon
only works if the account being switched to is already logged in, which doesn't help when the account is brand new.
I found this question regarding resuming bat file execution after a reboot, which is going to be very useful, but multi-user automation seems to be a much harder problem.