2013-04-05 244 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