2014-01-06 79 views
1

我曾經在Inno Setup中項目。所有安裝完美,但桌面上的圖標不顯示 - 圖標的白色。Inno Setup - 不顯示桌面上的圖標

#define MyAppName "My Program" 
#define MyAppVersion "3.2.0" 
#define MyAppVersionName "My Program 3 (64-bit)" 
#define MyAppExeName "myprogram.exe" 

.................. 

[Setup] 
SetupIconFile=C:\Users\path_to_my_program\myprogram_Icon.ico 

................ 

[Icons] 
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" 
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" 
Name: "{commondesktop}\{#MyAppVersionName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon 

如果我一直在寫部分[圖標]:

[Icons] 
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" 
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" 
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon 

然後我得到的桌面圖標完美之後安裝。

我該如何解決它的問題?

非常感謝。

+0

如果EXE不包含集成的圖標,那麼你應該複製/安裝圖標文件以及EXE,並在'[Icons]'部分使用'IconFilenName'標誌,例如:'[Files] Source:「C:\ Users \ path_to_my_program \ myprogram_Icon.ico「; DestDir:「{app}」[圖標]名稱:「{commondesktop} \ {#MyAppVersionName}」;文件名:「{app} \ {#MyAppExeName}」; IconFileName:「{app} \ myprogram_Icon.ico」;任務:desktopicon' – RobeN

+0

非常感謝! –

回答

1

如果EXE沒有默認的應用程序圖標,那麼你應該複製/安裝與EXE沿Icon File和使用IconFileName參數從[Icons]部分指定它的路徑:

[Files] 
Source: "C:\Users\path_to_my_program\myprogram_Icon.ico"; DestDir: "{app}" 

[Icons] 
Name: "{commondesktop}\{#MyAppVersionName}"; Filename: "{app}\{#MyAppExeName}"; 
    IconFileName: "{app}\myprogram_Icon.ico"; Tasks: desktopicon 
+0

非常感謝! –

+0

@AndriySkolozhabskiy - 您可以通過在投票計數器下標記Check來接受答案,或者UpVote這個答案,如果它解決了您的問題:) – RobeN