InnoSetup, add your App icon to Classic Control Panel
by Mountain Computers Inc., Publication Date: Thursday, March 14, 2019
View Count: 1767, Keywords: innosetup, registry, control panel icon, Hashtags: #innosetup #registry #controlpanelicon
If you are writing software and have always wanted your application icon in the Control Panel, well, you can do this. I tried the WinAero instructions manually for my application GUID and it worked fine. So i just exported the registry values and incorporated them into my InnoSetup iss script. It was easy, just read the help online description and did some testing and voila! Works on windows 7, 8.1, 10.
read this.
then read this.
Then tweak you iss file to be something like below, blend this into your file. the GUID is where is starts in the Setup section and then backtrack to the define section, and then copy and paste in your registry section and tweak to your needs. took me like 1 hour of playing around and it worked.
;03142019 ARF make the RegistryAppID match the AppID created by Generate GUID
#define RegistryAppId "{{ADC5401A-316D-4442-96DB-812D02DEAEC5}"
[Setup]
AppId={{ADC5401A-316D-4442-96DB-812D02DEAEC5}
I added the registry section based on the export
[Registry]
;examples
;The root key. This must be one of the following values:
;HKCR (HKEY_CLASSES_ROOT)
;HKCU (HKEY_CURRENT_USER)
;HKLM (HKEY_LOCAL_MACHINE)
;HKU (HKEY_USERS)
;HKCC (HKEY_CURRENT_CONFIG)
;Root: HKCU; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty
;Root: HKCU; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey
;Root: HKLM; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty
;Root: HKLM; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey
;Root: HKLM; Subkey: "Software\My Company\My Program\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"
;ValueName The name of the value to modify, which can include constants. If this is blank, it will modify the "Default" value.
;Windows Registry Editor Version 5.00
;[HKEY_CLASSES_ROOT\CLSID\{ADC5401A-316D-4442-96DB-812D02DEAEC5}]
;@="GoGreen PC TuneUp"
;"InfoTip"="Streamline and Optimize your PC"
Root: HKCR; Subkey: "CLSID\{#RegistryAppId}"; ValueType: string; ValueName: ""; ValueData: "GoGreen PC TuneUp"; Flags: uninsdeletekey
Root: HKCR; Subkey: "CLSID\{#RegistryAppId}"; ValueType: string; ValueName: "InfoTip"; ValueData: "Streamline and Optimize your PC"; Flags: uninsdeletekey
;[HKEY_CLASSES_ROOT\CLSID\{ADC5401A-316D-4442-96DB-812D02DEAEC5}\DefaultIcon]
;@="C:\\Program Files (x86)\\GoGreen PC TuneUp\\setupGoGreenPCTuneUp.exe,0"
Root: HKCR; Subkey: "CLSID\{#RegistryAppId}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\setupGoGreenPCTuneUp.exe,0"; Flags: uninsdeletekey
;[HKEY_CLASSES_ROOT\CLSID\{ADC5401A-316D-4442-96DB-812D02DEAEC5}\Shell]
Root: HKCR; Subkey: "CLSID\{#RegistryAppId}\Shell"; ValueType: string; ValueName: ""; ValueData: ""; Flags: uninsdeletekey
;[HKEY_CLASSES_ROOT\CLSID\{ADC5401A-316D-4442-96DB-812D02DEAEC5}\Shell\Open]
Root: HKCR; Subkey: "CLSID\{#RegistryAppId}\Shell\Open"; ValueType: string; ValueName: ""; ValueData: ""; Flags: uninsdeletekey
;[HKEY_CLASSES_ROOT\CLSID\{ADC5401A-316D-4442-96DB-812D02DEAEC5}\Shell\Open\Command]
;@="C:\\Program Files (x86)\\GoGreen PC TuneUp\\setupGoGreenPCTuneUp.exe"
Root: HKCR; Subkey: "CLSID\{#RegistryAppId}\Shell\Open\Command"; ValueType: string; ValueName: ""; ValueData: "{app}\setupGoGreenPCTuneUp.exe"; Flags: uninsdeletekey
;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{ADC5401A-316D-4442-96DB-812D02DEAEC5}]
;@="GoGreen PC TuneUp"
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{#RegistryAppId}"; ValueType: string; ValueName: ""; ValueData: "GoGreen PC TuneUp"; Flags: uninsdeletekey
more to come...
my computer innosetup iss for ggpctu ... not very hard.. took me like 6 hours playing with it 1 year ago.
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "GoGreen PC TuneUp"
#define MyAppVersion "5.1.12 - 03/14/2019"
#define MyAppPublisher "Mountain Computers Inc."
#define MyAppURL "https://mountaincomputers.org"
#define MyAppExeName "setupGoGreenPCTuneUp.exe"
;03142019 ARF make the RegistryAppID match the AppID created by Generate GUID
#define RegistryAppId "{{ADC5401A-316D-4442-96DB-812D02DEAEC5}"
[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.)
;SignTool=signtool
AppId={{ADC5401A-316D-4442-96DB-812D02DEAEC5}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
LicenseFile=C:\web\www.mountaincomputers.org\vb6\ggpctu\License.txt
InfoBeforeFile=C:\web\www.mountaincomputers.org\vb6\ggpctu\PreRequisites.txt
InfoAfterFile=C:\web\www.mountaincomputers.org\vb6\ggpctu\ReadMe.txt
OutputBaseFilename=GoGreenPCTuneUpInstaller
Compression=lzma
SolidCompression=yes
;PrivilegesRequired=admin
;03142019 ARF added registry section to add control panel icon for GGPCTU
[Registry]
;examples
;The root key. This must be one of the following values:
;HKCR (HKEY_CLASSES_ROOT)
;HKCU (HKEY_CURRENT_USER)
;HKLM (HKEY_LOCAL_MACHINE)
;HKU (HKEY_USERS)
;HKCC (HKEY_CURRENT_CONFIG)
;Root: HKCU; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty
;Root: HKCU; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey
;Root: HKLM; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty
;Root: HKLM; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey
;Root: HKLM; Subkey: "Software\My Company\My Program\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"
;ValueName The name of the value to modify, which can include constants. If this is blank, it will modify the "Default" value.
;Windows Registry Editor Version 5.00
;[HKEY_CLASSES_ROOT\CLSID\{ADC5401A-316D-4442-96DB-812D02DEAEC5}]
;@="GoGreen PC TuneUp"
;"InfoTip"="Streamline and Optimize your PC"
Root: HKCR; Subkey: "CLSID\{#RegistryAppId}"; ValueType: string; ValueName: ""; ValueData: "GoGreen PC TuneUp"; Flags: uninsdeletekey
Root: HKCR; Subkey: "CLSID\{#RegistryAppId}"; ValueType: string; ValueName: "InfoTip"; ValueData: "Streamline and Optimize your PC"; Flags: uninsdeletekey
;[HKEY_CLASSES_ROOT\CLSID\{ADC5401A-316D-4442-96DB-812D02DEAEC5}\DefaultIcon]
;@="C:\\Program Files (x86)\\GoGreen PC TuneUp\\setupGoGreenPCTuneUp.exe,0"
Root: HKCR; Subkey: "CLSID\{#RegistryAppId}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\setupGoGreenPCTuneUp.exe,0"; Flags: uninsdeletekey
;[HKEY_CLASSES_ROOT\CLSID\{ADC5401A-316D-4442-96DB-812D02DEAEC5}\Shell]
Root: HKCR; Subkey: "CLSID\{#RegistryAppId}\Shell"; ValueType: string; ValueName: ""; ValueData: ""; Flags: uninsdeletekey
;[HKEY_CLASSES_ROOT\CLSID\{ADC5401A-316D-4442-96DB-812D02DEAEC5}\Shell\Open]
Root: HKCR; Subkey: "CLSID\{#RegistryAppId}\Shell\Open"; ValueType: string; ValueName: ""; ValueData: ""; Flags: uninsdeletekey
;[HKEY_CLASSES_ROOT\CLSID\{ADC5401A-316D-4442-96DB-812D02DEAEC5}\Shell\Open\Command]
;@="C:\\Program Files (x86)\\GoGreen PC TuneUp\\setupGoGreenPCTuneUp.exe"
Root: HKCR; Subkey: "CLSID\{#RegistryAppId}\Shell\Open\Command"; ValueType: string; ValueName: ""; ValueData: "{app}\setupGoGreenPCTuneUp.exe"; Flags: uninsdeletekey
;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{ADC5401A-316D-4442-96DB-812D02DEAEC5}]
;@="GoGreen PC TuneUp"
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{#RegistryAppId}"; ValueType: string; ValueName: ""; ValueData: "GoGreen PC TuneUp"; Flags: uninsdeletekey
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags:
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
[Files]
Source: "C:\web\www.mountaincomputers.org\vb6\ggpctu\setupGoGreenPCTuneUp.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\web\www.mountaincomputers.org\vb6\ggpctu\windows10-restorepoint.cmd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\web\www.mountaincomputers.org\vb6\ggpctu\windows10-cleareventlogs.cmd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\web\www.mountaincomputers.org\vb6\ggpctu\windows10-restore-vss-correction.cmd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\web\www.mountaincomputers.org\vb6\ggpctu\windows10-deletewintempfiles.cmd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\web\www.mountaincomputers.org\vb6\ggpctu\License.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\web\www.mountaincomputers.org\vb6\ggpctu\ReadMe.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\web\www.mountaincomputers.org\vb6\ggpctu\ReleaseNotes.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\web\www.mountaincomputers.org\vb6\ggpctu\PreRequisites.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\web\www.mountaincomputers.org\vb6\ggpctu\NetworkIPs.txt"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
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
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent runascurrentuser
if you found this article helpful, consider contributing $10, 20 an Andrew Jackson or so..to the author. more authors coming soon
FYI we use paypal or patreon, patreon has 3x the transaction fees, so we don't, not yet.
© 2024 myBlog™ v1.1 All rights reserved. We count views as reads, so let's not over think it.