正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- #define MyAppName "我的程序"
- [Setup]
- AppName={#MyAppName}
- AppVersion=1.0
- UsePreviousAppDir=yes
- DefaultDirName={reg:HKLM\Software\Cleanse,InstPath|{pf}\{#MyAppName}}
- Uninstallable=false
- OutputDir=d:\My Documents\新建文件夹
- Compression=lzma
- SolidCompression=yes
- DirExistsWarning=no
- [Languages]
- Name: "chinesesimp"; MessagesFile: "compiler:Default.isl"
- [Files]
- Source: "D:\视频缓存提取工具\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
- [code]
- var
- OldPrgInstalled: boolean;
- OldPrgPath: string;
- function InitializeSetup(): Boolean;
- begin
- Result := true;
- OldPrgInstalled := false;
- if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Cleanse', 'InstPath', OldPrgPath) then
- if FileExists(OldPrgPath+'\MyProg.exe') then
- OldPrgInstalled := true;
- end;
- function ShouldSkipPage(PageID: Integer): Boolean;
- begin
- result := false;
- if PageID = wpSelectDir then
- result := OldPrgInstalled;
- end;
- function NextButtonClick(CurPageID: Integer): Boolean;
- begin
- Result:= true;
- if (CurPageID = wpSelectDir) and (not FileExists(ExpandConstant('{app}\MyProg.exe'))) then
- begin
- Result := false;
- MsgBox('你选择的目录没有需要补丁的程序,请选择正确的目录!', mbInformation, MB_OK);
- end;
- end;
复制代码
|