Author Topic: [ISS] Check for a registry value and ask what to do  (Read 1410 times)

0 Members and 1 Guest are viewing this topic.

Offline HcH

  • TechKnow Owner, Ethical Hacker
  • Administrator
  • Uber Member
  • *****
  • Posts: 9956
  • Karma: +2285/-111
[ISS] Check for a registry value and ask what to do
« on: November 22, 2011, 10:47:54 PM »

This shows how to use to react on a Yes / No question after some registry value is looked up. This stuff is useful when you want to update something:

Code: [Select]
function regcheck(): String;
 if RegKeyExists(HKEY_CURRENT_USER, 'Software\{#xAppName}') then
  if MsgBox('SmartQ Mod Tools already installed, overwrite existing installation?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDNO then

This function should be called from procedure CurStepChanged(CurStep: TSetupStep); CurStep = ssInstall), so the check get's done before installing the package! Also you can check after the installation is done, call this function from ssPostInstall then.