View Full Version : Registry.Doeskey exist
jerilyn
02-15-2006, 04:55 PM
I have a patch for an existing program and I want Setup Factory to check to see if the original program exists before proceeding with the installation. I suppose checking the registry would be the way to go. If the registry key exists, I want set up factory to proceed with the installation. IF the registry key does not exist, I want setup factory to pop up a message and then exit the installation. Can someone point me in the right direction? Thank you.
Eagle
02-17-2006, 12:48 AM
Hi, perhaps a real simplistic approach could be this for starters:
could place this in the 'On Startup' actions to see if that is sufficient for your needs:
(could test as is - then change the registry data to what you want)
if (not Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "Software\\My Target Application Key")) then
Dialog.Message("looks like she's AWOL", "i will have to exit now");
Application.Exit();
end
this relies there are no action errors and that the installer
has sufficient system access 'permissions' and that you
don't wish-need to do more to verify the target for the patch
is really there, eg: checking for the existance of file-s
(may not be relevent, just thought worth a mention)
hth a little
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.