View Single Post
Old 01-31-09, 11:09 PM   #11
JScones
Navy Seal
 
Join Date: Apr 2005
Posts: 5,501
Downloads: 19
Uploads: 0
Default

Quote:
Originally Posted by VikingGrandad
(just a very small point though, the link you added jumps to an anchor point further down this thread, rather than the first post...)
I have no idea what you are talking about.

Quote:
Originally Posted by VikingGrandad
Quote:
Originally Posted by JScones
BTW, just a suggestion, you guys making these GWX for SH3Cmdr file installers would make it MUCH easier for users if you didn't assume where they installed SH3Cmdr. It'd be much better to grab the *actual* path from the Registry and default to it.
Good idea. I'll see if I can figure out how to do that.
Replace:
Code:
DefaultDirName={pf}\SH3 Commander
with
Code:
DefaultDirName={reg:HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SH3 Commander_is1,InstallLocation|{pf}\SH3 Commander}
This is the quick and simple solution. It looks for SH3 Commander's install path and defaults to "Program Files\SH3 Commander" only if an install path is not found.

Of course, the basic logic here is that if no install path is found, then it is safe to assume that SH3 Commander has not been installed. So, while the above will work, *I* would go one step further and check when the installer initialises whether SH3 Commander exists. If not, then a graceful error and exit. If so, continue on, defaulting to the found path, but still allowing the user to override it if they wish (ie in case they've installed multiple copies of SH3 Commander).

The original GWX installer does this wrt to the SH3 path (the latest ones don't) and likewise all my installers. It's a very basic and simple thing to do but makes a big difference to userability.
JScones is offline   Reply With Quote