Automate a Telnet software installation
The script below automates a self-extract EXE file, as an example, a Telnet software. Note how #UseExact and #ActionTimeout system variables are used for a reliable automation.
You can find the corresponding script file under Script_Examples, sub-directory of scripts.
'Use Recording mode to automatize the different InstallShield installation screens.'As usually, all the window names in an InstallShield project start with the same string,
'force #UseExact=1. Like that, the UseWindow waits until the exact window name is found before going on.
#UseExact=1
'UseWindow statement fails after a default timeout at 30 secs, default value.
'For the installation step which copies all the files, such a timeout is too short.
'You can modify this default value using #ActionTimeout system variable.
Shell("C:\tn200e\tn2000e.exe",1)
UseWindow("TN2000E.EXE|#32770|WinZip Self-Extractor - tn2000e.exe",1)
Click(Button,"&Setup")
UseWindow("_INS5176._MP|#32770|Welcome",1)
Click(Button,"&Next >")
UseWindow("_INS5176._MP|#32770|Software License Agreement",1)
Click(Button,"&Yes")
UseWindow("_INS5176._MP|#32770|User Information",1)
Click(Button,"&Next >")
UseWindow("_INS5176._MP|#32770|Choose Destination Location",1)
Click(Button,"&Next >")
UseWindow("_INS5176._MP|#32770|Select Program Folder",1)
Click(Button,"&Next >")
'Insert a longer timeout to let all the files being copied.
'Setup Complete window appears when all the files are copied, so we insert a longer #ActionTimeout.
#ActionTimeout=300
UseWindow("_INS5176._MP|#32770|Setup Complete",1)
Click(Button,"Finish")