2013-04-05 203 views
1

我正在使用Inno Setup(5.5.3)創建一個可執行文件。我希望使用默認的卸載圖標(例如:My Program inno setup示例中的相同卸載圖標)。當我創建我的可執行文件時,我的程序的卸載圖標與程序的圖標相同,這可能會給用戶造成混淆。Inno Setup的Unistall圖標默認設置

; Script generated by the Inno Setup Script Wizard. 
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! 

#define MyAppName "Remove xyz-duplicate LiDAR points" 
#define MyAppVersion "0.2 Beta" 
#define MyAppExeName "remove_duplicate_xyz_executable_project.exe" 

[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={{73F937B9-0CD9-44F1-B07E-17CD2399EE13} 
AppName={#MyAppName} 
AppVersion={#MyAppVersion} 
;AppVerName={#MyAppName} {#MyAppVersion} 
DefaultDirName={pf}\{#MyAppName} 
DefaultGroupName={#MyAppName} 
AllowNoIcons=yes 
OutputBaseFilename=Remove xyz-duplicate LiDAR points 
SetupIconFile=C:\PythonScript\Script_fun\Remove_duplicate_xyz\LiDAR_Remove_xyz_Duplicate_Point_executable_project\iconRemoveduplicate_two_80res_small.ico 
Compression=lzma 
SolidCompression=yes 

[Languages] 
Name: "english"; MessagesFile: "compiler:Default.isl" 
Name: "brazilianportuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl" 
Name: "danish"; MessagesFile: "compiler:Languages\Danish.isl" 
Name: "french"; MessagesFile: "compiler:Languages\French.isl" 
Name: "german"; MessagesFile: "compiler:Languages\German.isl" 
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl" 
Name: "norwegian"; MessagesFile: "compiler:Languages\Norwegian.isl" 
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" 
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" 

[Tasks] 
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked 
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1 

[Files] 
Source: "C:\Program Files (x86)\Inno Setup 5\Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion 
Source: "C:\PythonScript\Script_fun\Remove_duplicate_xyz\LiDAR_Remove_xyz_Duplicate_Point_executable_project\dist\_ctypes.pyd"; DestDir: "{app}"; Flags: ignoreversion 
Source: "C:\PythonScript\Script_fun\Remove_duplicate_xyz\LiDAR_Remove_xyz_Duplicate_Point_executable_project\dist\_hashlib.pyd"; DestDir: "{app}"; Flags: ignoreversion 
Source: "C:\PythonScript\Script_fun\Remove_duplicate_xyz\LiDAR_Remove_xyz_Duplicate_Point_executable_project\dist\_socket.pyd"; DestDir: "{app}"; Flags: ignoreversion 
Source: "C:\PythonScript\Script_fun\Remove_duplicate_xyz\LiDAR_Remove_xyz_Duplicate_Point_executable_project\dist\_ssl.pyd"; DestDir: "{app}"; Flags: ignoreversion 
Source: "C:\PythonScript\Script_fun\Remove_duplicate_xyz\LiDAR_Remove_xyz_Duplicate_Point_executable_project\dist\bz2.pyd"; DestDir: "{app}"; Flags: ignoreversion 
Source: "C:\PythonScript\Script_fun\Remove_duplicate_xyz\LiDAR_Remove_xyz_Duplicate_Point_executable_project\dist\library.zip"; DestDir: "{app}"; Flags: ignoreversion 
Source: "C:\PythonScript\Script_fun\Remove_duplicate_xyz\LiDAR_Remove_xyz_Duplicate_Point_executable_project\dist\python27.dll"; DestDir: "{app}"; Flags: ignoreversion 
Source: "C:\PythonScript\Script_fun\Remove_duplicate_xyz\LiDAR_Remove_xyz_Duplicate_Point_executable_project\dist\remove_duplicate_xyz_executable_project.exe"; DestDir: "{app}"; Flags: ignoreversion 
Source: "C:\PythonScript\Script_fun\Remove_duplicate_xyz\LiDAR_Remove_xyz_Duplicate_Point_executable_project\dist\select.pyd"; DestDir: "{app}"; Flags: ignoreversion 
Source: "C:\PythonScript\Script_fun\Remove_duplicate_xyz\LiDAR_Remove_xyz_Duplicate_Point_executable_project\dist\unicodedata.pyd"; DestDir: "{app}"; Flags: ignoreversion 
; NOTE: Don't use "Flags: ignoreversion" on any shared system files 

[Icons] 
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" 
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" 
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon 
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon 

[Run] 
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent 
+0

可能重複[是否可以更改Inno安裝程序中的卸載圖標?](http://stackoverflow.com/questions/5170456/is-it-possible-to-change-在卸載圖標在inno安裝) – Deanna 2013-04-06 20:29:03

+0

嘿迪安娜我標誌刪除這個問題 – 2013-04-06 20:43:03

+1

確定重複[使用inno安裝程序卸載默認圖標](http://stackoverflow.com/questions/15845226/using-inno- setup-uninstall-default-icon) – Miral 2013-04-06 22:49:06

回答

2

您可以自定義要出現在菜單中添加一個IconFilename參數,你的圖標進入,這樣的圖標:

[icons] 
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" IconFileName: "{app}\MyUninstallerIcon.ico 

help

更多信息IconFilename

自定義圖標的文件名(定位d在用戶的系統上)被顯示。這可以是包含圖標或.ico文件的可執行映像(.exe,.dll)。如果此參數未指定或爲空白,則Windows將使用該文件的默認圖標。此參數可以包括常量

+0

你試過'IconIndex'參數嗎? – jachguate 2013-04-05 22:13:02

+0

什麼錯誤信息?還有,試試IconIndex參數。如果有幫助,我會改變我的答案。 ;) – jachguate 2013-04-05 22:13:40

+0

答案的代碼只是一個例子,在現實生活中,你必須在你的'[files]'部分中包含一個假設的MyUninstallerIncon.ico文件! (你注意到閱讀手冊;)) – jachguate 2013-04-05 22:15:41