Advertisement
TLama

Untitled

May 10th, 2013
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.85 KB | None | 0 0
  1. [Setup]
  2. AppName=My Program
  3. AppVersion=1.5
  4. DefaultDirName={pf}\My Program
  5. OutputDir=userdocs:Inno Setup Examples Output
  6. VersionInfoVersion=19.81.9.81
  7.  
  8. [Code]
  9. procedure InitializeWizard;
  10. var
  11.   Version: string;
  12. begin
  13.   // check if there's any previous directory; if so try to get the version string; if that succeed,
  14.   // check the current VersionInfoVersion value is lower than the obtained version; if that's true,
  15.   // show the message and exit setup by throwing a silent EAbort exception
  16.   if (WizardForm.PrevAppDir <> '') and
  17.     GetVersionNumbersString(AddBackslash(WizardForm.PrevAppDir) + 'bin\application.exe', Version) and
  18.     (CompareText('{#emit SetupSetting("VersionInfoVersion")}', Version) < 0) then
  19.   begin
  20.     MsgBox('You''re going to install older version! Setup will now exit...', mbInformation, MB_OK);
  21.     Abort;
  22.   end;  
  23. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement