PDA

View Full Version : Can my installer detect a prior installation?



NewsArchive
09-10-2010, 12:35 AM
Hi,

Is it possible to add something to my SB installer to check for prior installations of my software and then install the new version to the same drive and folder?

Regards,
Abe

NewsArchive
09-10-2010, 12:35 AM
> Is it possible to add something to my SB installer to check for prior installations of my software and then install the new version to the same drive and folder?

Hi Abe,

Sure.

Just store the path to the install in HKLM (which is accessible to you in
the elevated installer) and use that as the default for the install path.

Or you can go the route of conditionally hiding the dialog to select a path
if a previous install is found.

I prefer to just set the default and leave the dialog available though.

Charles


--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.clarionproseries.com - "Get ProPath, make your Clarion programs ready
for Windows 7 and Vista!"
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
09-10-2010, 12:36 AM
Check out http://msdn.microsoft.com/en-us/library/aa372105%28VS.85%29.aspx

You will probably be using a unique GUID so look for
HKEY LOCAL MACHINE\Software\Microsoft\Windows\CurrentVersion\ Uninstall\{MyAppsGuid}
Then look up InstallLocation for the path its installed to.

SB does a good job sticking to the MS unlike other installers I see installed under the above registry key.

Richard Rose

NewsArchive
09-10-2010, 12:36 AM
Abe,

> Is it possible to add something to my SB installer to check for prior
> installations of my software and then install the new version to the
> same drive and folder?

You can use the "Detect Previous Version..." script function :)

http://www.lindersoft.com/forums/showthread.php?p=41255#post41255
http://www.lindersoft.com/forums/showthread.php?p=32174#post32174

Friedrich

NewsArchive
09-12-2010, 03:03 AM
Thanks everyone. Friedrich's example is exactly what I was looking for

Abe Jimenez