Skip to content
⌘ NSIS Forum Archive

Selecting "No" button on a dialog

9 posts

tkw829#

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#
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#
The file being installed is actually an executable, so I don't really have any control over it.
kichik#
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:



It's better to suppress a reboot the way it was designed to be suppressed than to click the no button programmatically.
tkw829#
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#
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.
lzandman#
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.