; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "立思辰WEBSCAN" #define MyAppVersion "4.35.14000.22311" #define MyAppSetupName "LanxumWebScan_Setup" #define MyAppDefSetupDir "LanxumWebScan" #define MyAppPublisher "立思辰信息科技有限公司" [Setup] ; NOTE: The value of AppId uniquely identifies this application. ; Do not use the same AppId value in installers for other applications. ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) AppId={{95956800-B6C2-4A37-B02B-A33E16F574D1} AppName={#MyAppName} AppVerName={#MyAppName} AppVersion={#MyAppVersion} DefaultDirName={pf}\{#MyAppDefSetupDir} DefaultGroupName={#MyAppName} VersionInfoVersion={#MyAppVersion} OutputDir=..\..\package OutputBaseFilename={#MyAppSetupName}_{#MyAppVersion} Compression=lzma AppPublisher={#MyAppPublisher} SolidCompression=yes UninstallIconFile=uninstall.ico SetupIconFile=LanxumWebScan.ico LicenseFile=LanxumWebScan_License.txt PrivilegesRequired=admin DisableWelcomePage=no [Languages] Name: "zn"; MessagesFile: "compiler:Languages/ChineseSimp.isl" [Files] ; app Source: ".\LanxumWebScan.ico"; DestDir: "{app}\"; Flags: ignoreversion Source: "..\..\x86\Release\宋体.ttf"; DestDir: "{app}\"; Flags: ignoreversion Source: "..\..\x86\Release\IsTask.dll"; DestDir: "{app}\"; Flags: ignoreversion Source: "..\..\x86\Release\LSCWebScan.exe"; DestDir: "{app}\"; Flags: ignoreversion Source: "..\..\..\..\code_app\doc\webscan\国产化设备接口函数标准0816.doc"; DestDir: "{app}\doc\"; Flags: ignoreversion Source: "..\..\..\..\code_app\test\webscan\*"; DestDir: "{app}\demo\"; Flags: ignoreversion createallsubdirs recursesubdirs Source: "..\..\x86\Release\LSCBase.dll"; DestDir: "{app}\"; Flags: ignoreversion Source: "..\..\x86\Release\LSCImgFmt.dll"; DestDir: "{app}\"; Flags: ignoreversion Source: "..\..\x86\Release\LSCImgProc.dll"; DestDir: "{app}\"; Flags: ignoreversion Source: "..\..\x86\OEM\lanxum\sane.dll"; DestDir: "{app}\"; Flags: ignoreversion Source: "..\..\x86\OEM\lanxum\scanner.dll"; DestDir: "{app}\"; Flags: ignoreversion Source: "..\..\x86\Release\libmupdf.dll"; DestDir: "{app}\"; Flags: ignoreversion Source: "..\..\x86\Release\pdflib.dll"; DestDir: "{app}\"; Flags: ignoreversion Source: "..\..\x86\Release\msvcp140.dll"; DestDir: "{app}\"; Flags: ignoreversion; Source: "..\..\x86\Release\vcruntime140.dll"; DestDir: "{app}\"; Flags: ignoreversion; Source: "..\..\x86\Release\concrt140.dll"; DestDir: "{app}\"; Flags: ignoreversion; ;拷贝驱动 Source: "..\..\usb\lanxum\lanxumusb.inf"; DestDir: "{app}\driver\"; Flags: ignoreversion recursesubdirs; Source: "..\..\usb\lanxum\lanxumusb.cat"; DestDir: "{app}\driver\"; Flags: ignoreversion recursesubdirs; Source: "..\..\x86\Release\DPInst32.exe"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs; Check: not IsWin64 Source: "..\..\x64\Release\DPInst64.exe"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs; Check: IsWin64 [INI] [Icons] Name: "{group}\立思辰WEBSCAN接口文档"; Filename: "{app}\doc\国产化设备接口函数标准0816.doc" Name: "{group}\立思辰WEBSCAN示例网页"; Filename: "{app}\demo\demo.html" Name: "{group}\{cm:UninstallProgram, {#MyAppName}}"; Filename: "{uninstallexe}"; [Registry] Root: HKLM; Subkey: "Software\LanxumWebScan"; ValueType: string; ValueName: "AppDirectory"; ValueData: "{app}"; Flags: uninsdeletekey Root: HKLM; Subkey: "Software\LanxumWebScan"; ValueType: string; ValueName: "Application"; ValueData: "{app}\LSCWebScan.exe"; Flags: uninsdeletekey Root: HKLM; Subkey: "Software\LanxumWebScan"; ValueType: string; ValueName: "AppVersion"; ValueData: "{#MyAppVersion}"; Flags: uninsdeletekey Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "LSCWebScan"; ValueData: "{app}\LSCWebScan.exe" [Code] // 卸载前判断进程是否在运行 function RunTaskU(FileName: string; bFullpath: Boolean): Boolean; external 'RunTask@{app}/ISTask.dll stdcall delayload uninstallonly'; function KillTaskU(ExeFileName: string): Integer; external 'KillTask@{app}/ISTask.dll stdcall delayload uninstallonly'; function InitializeUninstall(): Boolean; begin Result:= true; if RunTaskU('LSCWebScan.exe', false) then begin KillTaskU('LSCWebScan.exe'); Result:= true; end else Result:= true; UnloadDll(ExpandConstant('{app}/ISTask.dll')); end; function SetUninstallIcon(iconPath:string): Boolean; var InstalledVersion,SubKeyName: String; begin SubKeyName := 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{95956800-B6C2-4A37-B02B-A33E16F574D1}_is1'; RegWriteStringValue(HKLM,SubKeyName,'DisplayIcon',iconPath); end; procedure CurPageChanged(CurPageID: Integer); begin if CurPageID = wpFinished then begin SetUninstallIcon(ExpandConstant('{app}\LanxumWebScan.ico')); end; end; procedure CurUninstallStepChanged(CurUninstallStep:TUninstallStep); begin if CurUninstallStep = usDone then begin DelTree(ExpandConstant('{app}'), True, True, True); end; end; [Run] Filename: "{app}\DPInst32"; Parameters: "/path ""{app}\driver"" /sw /se /lm /f"; Check: not IsWin64; Flags: runascurrentuser Filename: "{app}\DPInst64"; Parameters: "/path ""{app}\driver"" /sw /se /lm /f"; Check: IsWin64; Flags: runascurrentuser Filename: "{app}\LSCWebScan.exe"; Description: "{cm:LaunchProgram, {#MyAppName}}"; Flags: nowait runascurrentuser