Active Server Pages Installation Sample Script
Keywords: active server installation sample script
Question:
The Setup program normally requires users to click on some dialog boxes. How can I automate that using
WinBatch? Is there any example that automates clicking dialog box?
Answer:
It depends. In a lot of cases you can just send keystrokes.
For more complicated problems, you can try downloading our Control Manager extender.
Here's an example that installs Active Server Pages.
;IN THIS EXAMPLE, H: IS THE CD-ROM DRIVE TO INSTALL FROM.
;CHANGE ACCORDING TO YOUR SYSTEM CONFIGURATION AS TO WHERE
;ASPSETUP.BAT IS LOCATED.
intcontrol(12,5,0,0,0)
;'run=h:\post4\iis30\asp\aspsetup.bat'
TimeDelay(1)
dacommand='h:\post4\iis30\asp\aspsetup.bat'
run(dacommand,'')
;'License Agreement=~'
windowtitle='License Agreement'
WinWaitExist(windowtitle,-1)
windowtitle=WinIDGet(windowtitle)
TimeDelay(1)
if winexist(windowtitle)
intcontrol(36,windowtitle,5,0,0)
Sendkeysto(windowtitle,'~')
endif
;'Active Server Pages=~'
windowtitle='Active Server Pages'
WinWaitExist(windowtitle,-1)
windowtitle=WinIDGet(windowtitle)
TimeDelay(1)
if winexist(windowtitle)
intcontrol(36,windowtitle,5,0,0)
Sendkeysto(windowtitle,'~')
endif
;'Stop Internet=~'
windowtitle='Stop Internet'
WinWaitExist(windowtitle,-1)
windowtitle=WinIDGet(windowtitle)
TimeDelay(1)
if winexist(windowtitle)
intcontrol(36,windowtitle,5,0,0)
Sendkeysto(windowtitle,'~')
endif
;'Select Options=~'
windowtitle='Select Options'
WinWaitExist(windowtitle,-1)
windowtitle=WinIDGet(windowtitle)
TimeDelay(1)
if winexist(windowtitle)
intcontrol(36,windowtitle,5,0,0)
Sendkeysto(windowtitle,'~')
endif
;'Select Paths=~'
windowtitle='Select Paths'
WinWaitExist(windowtitle,-1)
windowtitle=WinIDGet(windowtitle)
TimeDelay(1)
if winexist(windowtitle)
intcontrol(36,windowtitle,5,0,0)
Sendkeysto(windowtitle,'~')
endif
;'Warning=~'
windowtitle='Warning'
WinWaitExist(windowtitle,-1)
windowtitle=WinIDGet(windowtitle)
TimeDelay(1)
if winexist(windowtitle)
intcontrol(36,windowtitle,5,0,0)
Sendkeysto(windowtitle,'~')
endif
;'Setup is Complete=~'
windowtitle='Setup is Complete'
WinWaitExist(windowtitle,-1)
windowtitle=WinIDGet(windowtitle)
TimeDelay(1)
if winexist(windowtitle)
intcontrol(36,windowtitle,5,0,0)
Sendkeysto(windowtitle,'~')
endif
;'Information=~'
windowtitle='Information'
WinWaitExist(windowtitle,-1)
windowtitle=WinIDGet(windowtitle)
TimeDelay(1)
if winexist(windowtitle)
intcontrol(36,windowtitle,5,0,0)
Sendkeysto(windowtitle,'~')
endif
;'Start Internet=~#~winwaitclose'
windowtitle='Start Internet'
WinWaitExist(windowtitle,-1)
windowtitle=WinIDGet(windowtitle)
TimeDelay(1)
if winexist(windowtitle)
intcontrol(36,windowtitle,5,0,0)
Sendkeysto(windowtitle,'~')
endif
TimeDelay(1)
winwaitclose(windowtitle)
Article ID: W13384
Filename: Active Server Installation Script.txt