I need help with an autoit script. I wrote. Basically what it does is run a view cmd files that are located in C:\Apps, resets the Administrator password via control userpasswords2
The script works but it i have to close the cmd windows before it runs the next command.
I'd like to wait until each command is done, before going on to the next, I have included start /wait in the cmd files.
lastly it opens word 2010 to check the activation status. I have tried _RUNDOS in autoit and that closes the windows but it if I put start /wait it will NOT move on to the next command,
My Auto it script
#include <Process.au3>
Run('control userpasswords2')
WinWait("User Accounts","")
Send("{SPACE}{SPACE}{TAB}{TAB}{TAB}{ENTER}")
Send("password{SHIFTDOWN}?{SHIFTUP}{TAB}password{SHIFTDOWN}?{SHIFTUP}{TAB}{ENTER}")
Send("{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}")
RunWait(@comspec & " /c start /wait resynctime.cmd","C:\Apps")
RunWait(@comspec & " /c Start /wait StartOffice2010serviceWinxp.cmd", "C:\Apps")
RunWait(@comspec & " /c (Start /wait ActivateOffice2010.cmd", "C:\Apps")
Run('C:\Program Files\Microsoft Office\Office14\Winword.exe')
WinWait("Document1 [Compatibility Mode] - Microsoft Word","")
Send("{ALTDOWN}f{ALTUP}h")
Resynctime.cmd
cmd /c w32tm /resync /nowait
StartOffice2010serviceWinxp.cmd
start /wait cscript "c:\Program Files\Microsoft Office\Office14\ospp.vbs" /osppsvcrestart
ActivateOffice2010.cmd
cmd.exe /c start /wait cscript "%ProgramFiles%\Microsoft Office\Office14\ospp.vbs" /act



Help

Back to top










