Hi Kim,
Thanks very much for your input. I've continued the discussion below, but I
would like to say at the top of the post that the practical upshot is that I've
built a test to show what the silent-capable installer would look like if you
run it *without* the /S silent switch. It is available from
http://zengine.net/dqsd-test-B006.exe, and all comments are welcome.
The new installer behaves like this:
- If run normally (without the silent /S switch), you get the warning message boxes, and basically
it behaves just as it did before, except that you now see the "Choose installation
folder" dialog and the "Installing..." dialog.
- If run with the silent /S switch, you now see nothing whatsoever - no message
boxes, no dialogs. If the installer exits successfully, it returns zero; if it
needs a reboot, it returns 194 (see below).
The present version does not work perfectly with the /S switch - it installs the files correctly,
so far as I can see, but the "Add Quick Search..." item does not appear in the
"Toolbars" submenu when you right-click on the taskbar after installation. (The item does
appear if you run the installer in normal mode, without the /S switch.) The NSIS script is
available from http://zengine.net/dqsd-test-B006.nsi, if anyone has some ideas on this. I wouldn't
normally release a test with a problem like that, but I thought it might be wise to show what the
non-silent install would look like, so that no real effort is wasted if it's not acceptable.
Although all I've really done is move some code into an "onInit" function,
please be aware that I'm still new to NSIS, so I should warn everyone that I may very
well have made some egregious error that will hose your system. OTOH, I've been
installing and uninstalling this all night and I haven't broken my own system yet, but...
This is very much a "first go" at the installer, so I'd be grateful for any testing and
comments - especially if someone can tell me what's wrong with "Add Quick Search..."
under silent installation.
[Discussion follows]
Yeah, I think the message boxes are there for a reason.
Agreed - we should keep them in if the installer is run non-silently.
[Changing to SilentInstall normal] has a side-effect: if /S
is not specified, the dqsd.exe installer now shows a dialog
asking the user to choose the installation folder (with the
default of "C:\Program Files\Quick Search Deskbar").
Great! I've always wondered why that wasn't on to begin with... Then again,
maybe we should go over the code to make sure it's not making assumptions
somewhere? Though I think some people on the list are running DQSD from a
non-C drive.
I also prefer to see the "Choose your installation folder" dialog if installer
is run non-silently. Good point about the checking the code for assumptions - I'm afraid
I'm still new to NSIS, so I'm not sure how to review the code in this way. The NSIS
script looks to use $INSTDIR to refer to the (default or chosen) directory in an
appropriate way, but I can't be sure.
I know that Kim's excellent DQSDHost.dll requires the
default installation path
Later versions of the new host actually doesn't. Brent was kind enough to
make it registry-configurable. Can't say for the rest, but I *think* it's
OK, as mentioned above.
Nice! I don't know how those registry entries work, but that should make the
job even easier if DQSDHost.dll becomes part of the standard distribution.
The unattended.sourceforge.net project allows a
.reboot-on directive which reboots gracefully if an installer
returns a particular code.
Sure, sounds workable to me. I believe the reboot is only occasionally
necessary, but I can't say for sure what triggers it.
I remembered something today, and now I'd prefer to use SetErrorLevel 194
(decimal) if the installer is run silently and requires a reboot. The error
level can be any arbitrary number except 0, 1 and 2, but if we use 194 it will
be obvious what we are doing to someone who uses Unattended, since many
Microsoft installers exit with this value if they require a reboot (see
http://unattended.sourceforge.net/apps.php).
All comments welcome.
Cheers,
Dave.
Kim Gräsman wrote on 01/02/2006 21:06
Hi Dave,
Sorry for not getting back to you earlier on this, your latest e-mail
reminded me!
My initial reaction is that this would be unacceptable. The
MessageBox warnings are useful for normal users and should be
shown unless /S is explicitly specified - unless anyone here
thinks differently?
Yeah, I think the message boxes are there for a reason. We added the initial
("You must be an admin") one pretty recently, because we had reports that
people failed to install because they weren't admins.
(2) The solution that presents itself immediately is to
change the install mode to read: "SilentInstall normal". This
ensures that MessageBox warnings with /SD defaults will be
shown unless /S is specified, but it has a side-effect: if /S
is not specified, the dqsd.exe installer now shows a dialog
asking the user to choose the installation folder (with the
default of "C:\Program Files\Quick Search Deskbar").
Great! I've always wondered why that wasn't on to begin with... Then again,
maybe we should go over the code to make sure it's not making assumptions
somewhere? Though I think some people on the list are running DQSD from a
non-C drive.
(2a) I know that Kim's excellent DQSDHost.dll requires the
default installation path (see
http://sourceforge.net/mailarchive/message.php?msg_id=10225235
), but does any part of the default distribution require that path?
Later versions of the new host actually doesn't. Brent was kind enough to
make it registry-configurable. Can't say for the rest, but I *think* it's
OK, as mentioned above.
(2b) With regard to DQSDHost.dll, is it acceptable to suppose
that if you're the sort of user that will be installing the
host, then you're the sort of user who will be clued-up
enough to make sure that the installation paths are correct
for the host?
Definitely. We should be making DQSDHost.dll part of the main package as
soon as possible, IMO, but until then, it's only for clueful users :-)
(2c) The installation instructions at http://www.dqsd.net/
assume that the path is hardcoded. Is it acceptable to
require a modification to those instructions?
Yep, no problems there, anyone with CVS access can modify those
instructions.
(2d) Are there any other reasons why we should not show the
"Choose installation folder" dialog?
Pending any input from the other devs, I don't think so.
The unattended.sourceforge.net project allows a
.reboot-on directive which reboots gracefully if an installer
returns a particular code. So we could specify that the
installer returns zero if the installation succeeded fully,
and returns (say) 20 if the installation succeeded but needs
a reboot.
Sure, sounds workable to me. I believe the reboot is only occasionally
necessary, but I can't say for sure what triggers it.
Thanks for your thorough work on this one!
- Kim
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Archive: https://lists.sourceforge.net/lists/listinfo/dqsd-devel
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Archive: https://lists.sourceforge.net/lists/listinfo/dqsd-devel