tkw829
20th October 2003 21:48 UTC
Selecting "No" button on a dialog
I have setup an installer that kicks of a secondary install of WSH. When this install finishes, it pops up with an option to reboot. I would like to programatically select the no option. I am already able to find this window and close it, but the install of WSH isn't completed until one of the buttons is selected. Any help would be appreciated.
kichik
20th October 2003 21:54 UTC
If it's a WSH file, why not change it to not ask it? If it's generated automatically or extracted during installation you can edit it using FileOpen, FileRead, FileWrite and FileClose. It's much simpler and safer than trying to programmatically click a button.
tkw829
20th October 2003 22:51 UTC
The file being installed is actually an executable, so I don't really have any control over it.
kichik
20th October 2003 22:57 UTC
Oh, it installs WSH, not installs using WSH, heh :)
Try finding out if it has some command line arguments. If it's a Microsoft installer it must have something to suppress reboots. The following page contains some information about several common installation systems:
http://unattended.sourceforge.net/installers.html
It's better to suppress a reboot the way it was designed to be suppressed than to click the no button programmatically.
tkw829
20th October 2003 23:10 UTC
It has a /Q switch for a so-called "Quiet mode", but this only suppresses the little files traveling from folder to folder. The dialog asking to reboot shows up regardless.
kichik
20th October 2003 23:14 UTC
Check out Microsoft hotfixes and older packages in that link. It tells you how supress reboots for those installers. If it's WSH and supports /Q and surely supports /z or /r:n.
tkw829
20th October 2003 23:20 UTC
/r:n works. It wasn't documented though. Thanks alot!
kichik
20th October 2003 23:35 UTC
They also support the /r:n switch to suppress the reboot.
;)
lzandman
21st October 2003 07:17 UTC
Originally posted by tkw829
/r:n works. It wasn't documented though.
I guess you've never used Micro$oft software before? A lot is undocumented...
But actually there are some references to those command line switches in the Microsoft docs if you look really hard.