Adding your program to the Control Panel: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
m (Reverted edits by 193.251.135.118 to last version by Deguix) |
|||
Line 5: | Line 5: | ||
You have to refresh the Control Panel, if in use, in order to work. | You have to refresh the Control Panel, if in use, in order to work. | ||
Tested only on Windows XP SP2. | Tested only on Windows XP SP2. | ||
== The Macros == | == The Macros == |
Revision as of 15:01, 22 March 2013
Author: ZmAn3 (talk, contrib) |
Description
These macros below add or remove items from the Control Panel. You have to refresh the Control Panel, if in use, in order to work. Tested only on Windows XP SP2.
The Macros
!define WControlPanelItem_Add `!insertmacro WControlPanelItem_Add` !macro WControlPanelItem_Add `GUID` `Name` `Tip` `Exec` `Icon` WriteRegStr HKCR `CLSID\${GUID}` `` `${Name}` WriteRegStr HKCR `CLSID\${GUID}` `InfoTip` `${Tip}` WriteRegStr HKCR `CLSID\${GUID}\DefaultIcon` `` `${Icon}` WriteRegStr HKCR `CLSID\${GUID}\Shell\Open\Command` `` `${Exec}` WriteRegDWORD HKCR `CLSID\${GUID}\ShellFolder` `Attributes` `0` WriteRegStr HKLM `SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\${GUID}` `` `${Name}` !macroend !define WControlPanelItem_Remove `!insertmacro WControlPanelItem_Remove` !macro WControlPanelItem_Remove `GUID` DeleteRegKey HKCR "CLSID\${GUID}" DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\${GUID}" !macroend