View Full Version : Aborting an Installation
NewsArchive
05-27-2009, 04:12 AM
Hi,
How do I check to see if an application has already been installed and if it
has abort installing is again?
Thanks
Ken Stone
NewsArchive
05-27-2009, 04:12 AM
Ken,
> How do I check to see if an application has already been installed and if it
> has abort installing is again?
You could create a key in either HKLM (or HKCU)
HKEY_LOCAL_MACHINE\SOFTWARE\<company>\<product> and simply check for
that key or, if you wanted, place the last installed version so you
can compare. Of course the version could/should be a version resource
in your program EXE.<g>
If you need to bail use the "Exit Installation" control statement.
--
Lee White
Enroll Today at http://CWaddons.com
NewsArchive
05-27-2009, 04:13 AM
As Lee said...
SetupBuilder creates a GUID for each new product you create (Project |
Settings | Product | PRODUCTGUID )
So you could put that in a Registry key and check for it.
If your product uses Add/Remove Programs support, your productguid will
*automatically* be stashed in the Registry
(HKLM\Software\Microsoft\Windows\CurrentVersion\Un install on a 32-bit
machine) and you can test for it automatically using the Detect Previous
Version script function.
If you don't use Add/Remove and haven't stashed the GUID yourself, you could
always do a brute-force search for your .exe using the Search for File
script function... but that would certainly slow down your installation.
Jane
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.