abuthemagician
IS-IT--Management
I have a program that takes a while to pop up after running setup.exe on certain computers. I am writting scripts to automate the install process, and wanted to know if there was a way to wait until the second window popped up before executing commands. I only have this to go by for code...
Set Running = AppActivate "SymForm Setup"
Do While Running.Status = 0
WScript.Sleep 10000 'wait ten seconds
Loop
SymForm Setup is the name of the window that pops up after the install shield wizard.
here is the rest of my code:
<package>
<job id="vbs">
<script language="VBScript">
set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "\\Ris\Software\Synergent\Symforms\Setup.exe"
WScript.Sleep 5000
Set Running = AppActivate "SymForm Setup"
Do While Running.Status = 0
WScript.Sleep 10000 'wait ten seconds
Loop
WshShell.AppActivate "SymForm Setup"
WScript.Sleep 3000
WshShell.SendKeys "{ENTER}"
WScript.Sleep 3000
WshShell.SendKeys "{ENTER}"
WScript.Sleep 3000
WshShell.SendKeys "{ENTER}"
WScript.Sleep 3000
WshShell.SendKeys "{ENTER}"
WScript.Sleep 10000
WshShell.SendKeys "{ENTER}"
</script>
</job>
</package>
Also, can i send keys to a specific application? And is there a better way than WScript.Sleep to wait for the next set of options?
Set Running = AppActivate "SymForm Setup"
Do While Running.Status = 0
WScript.Sleep 10000 'wait ten seconds
Loop
SymForm Setup is the name of the window that pops up after the install shield wizard.
here is the rest of my code:
<package>
<job id="vbs">
<script language="VBScript">
set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "\\Ris\Software\Synergent\Symforms\Setup.exe"
WScript.Sleep 5000
Set Running = AppActivate "SymForm Setup"
Do While Running.Status = 0
WScript.Sleep 10000 'wait ten seconds
Loop
WshShell.AppActivate "SymForm Setup"
WScript.Sleep 3000
WshShell.SendKeys "{ENTER}"
WScript.Sleep 3000
WshShell.SendKeys "{ENTER}"
WScript.Sleep 3000
WshShell.SendKeys "{ENTER}"
WScript.Sleep 3000
WshShell.SendKeys "{ENTER}"
WScript.Sleep 10000
WshShell.SendKeys "{ENTER}"
</script>
</job>
</package>
Also, can i send keys to a specific application? And is there a better way than WScript.Sleep to wait for the next set of options?