Can anyone tell me why this isn't working? I've included the debug code also.
I really appreciate your help!
Edit: Added #RequireAdmin - Same result.
#include <File.au3> ; Not necessary for the block in question, but the goal of the script is to create some directories and install programs. #RequireAdmin ;Set up Administrator account and map necessary Drive $cmd = 'net user administrator /active:yes' RunWait (@ComSpec &'/k' & $cmd) ; @error = 1, @extended = 2 $pwd = 'net user administrator password' @error = 1, @extended = 2 RunWait (@ComSpec &'/k' & '$pwd') ; @error = 1, @extended = 2 DriveMapAdd ('j:', '\\server\share', 'administrator', 'password') ; @error = 6, @extended = 0 <== ostensibly so since the administrator is never getting set on line 3.
I really appreciate your help!
Edit: Added #RequireAdmin - Same result.