Archive: Selecting "No" button on a dialog


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.


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.


The file being installed is actually an executable, so I don't really have any control over it.


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.


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.


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.


/r:n works. It wasn't documented though. Thanks alot!


They also support the /r:n switch to suppress the reboot.
;)

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.