Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Setup]
- AppName=My Program
- AppVersion=1.5
- DefaultDirName={pf}\My Program
- OutputDir=userdocs:Inno Setup Examples Output
- VersionInfoVersion=19.81.9.81
- [Code]
- procedure InitializeWizard;
- var
- Version: string;
- begin
- // check if there's any previous directory; if so try to get the version string; if that succeed,
- // check the current VersionInfoVersion value is lower than the obtained version; if that's true,
- // show the message and exit setup by throwing a silent EAbort exception
- if (WizardForm.PrevAppDir <> '') and
- GetVersionNumbersString(AddBackslash(WizardForm.PrevAppDir) + 'bin\application.exe', Version) and
- (CompareText('{#emit SetupSetting("VersionInfoVersion")}', Version) < 0) then
- begin
- MsgBox('You''re going to install older version! Setup will now exit...', mbInformation, MB_OK);
- Abort;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement