# HG changeset patch
# User Adrian Buehlmann <adr...@cadifra.com>
# Date 1251740565 -7200
# Branch stable
# Node ID 518d37486a1f45fcdcb6775623505669b3114150
# Parent  4c3f77e5e0ee87debe22015073ecb05791f8f1e7
iss: make installing the shell extension optional

Introducing components. The shell component requires admin login.
Shows a warning box that the shell component will not be available
for installing, if the installer is run by a non-admin.

The installer runs perfectly fine under non-admin and just
installs everything but the shell extension. Like this,
users with non-admin accounts are able to install mercurial
and TortoiseHg (dialogs!) command line commands ('hg' and 'hgtk').
In this case, the installer doesn't even force a restart.
This should also be quite useful for people just wanting bare
'hg' as well.

OS restart is only done if the shell extension is installed
(or uninstalled). So, if a non-admin runs the installer, there
will be no restart anyway.

Note that the 'restartreplace' Flag is specified *not* to work
if the installer is run by a non-admin (per Inno Setup's docu
*and* msdn documentation -- see function MoveFileEx, which
is used by Inno Setup).

Note: The diff for registry.iss looks like a near complete
rewrite, but it is not. I had to add '; Components: shell'
to almost all lines.

Furthermore, expanded shutdown of thgtaskbar.exe for uninstall
case.

diff --git a/contrib/win32/mercurial.iss b/contrib/win32/mercurial.iss
--- a/contrib/win32/mercurial.iss
+++ b/contrib/win32/mercurial.iss
@@ -35,10 +35,20 @@ WizardSmallImageFile=..\misc\install-wiz
 AllowNoIcons=true
 DefaultGroupName=TortoiseHg
 PrivilegesRequired=poweruser
-AlwaysRestart=yes
+AlwaysRestart=no
 SetupLogging=yes
 ArchitecturesInstallIn64BitMode=x64
 
+[Types]
+Name: "full"; Description: "Full installation"
+Name: "custom"; Description: "Custom installation"; Flags: iscustom
+
+[Components]
+Name: "main"; Description: "Main Files (includes 'hg' and 'hgtk' commands)"; 
Types: full custom; Flags: fixed
+Name: "help"; Description: "Help Files"; Types: full
+Name: "hgbook"; Description: "The book 'Mercurial: The Definitive Guide' 
(PDF)"; Types: full
+Name: "shell"; Description: "Shell integration (overlay icons, context menu) 
[admin required]"; Types: full; Flags: restart; Check: ShellInstallPossible
+
 [Files]
 Source: ..\build-hg\contrib\mercurial.el; DestDir: {app}/contrib
 Source: ..\build-hg\contrib\vim\*.*; DestDir: {app}/contrib/vim
@@ -48,7 +58,7 @@ Source: ..\build-hg\contrib\win32\ReadMe
 Source: ..\build-hg\templates\*.*; DestDir: {app}\templates; Flags: 
recursesubdirs createallsubdirs
 Source: ..\build-hg\locale\*.*; DestDir: {app}\locale; Flags: recursesubdirs 
createallsubdirs
 Source: ..\build-hg\i18n\*.*; DestDir: {app}\i18n; Flags:
-Source: ..\build-hg\doc\*.html; DestDir: {app}\docs; Flags:
+Source: ..\build-hg\doc\*.html; DestDir: {app}\docs; Flags: ; Components: help
 Source: {app}\Mercurial.ini; DestDir: {app}\backup; Flags: external 
skipifsourcedoesntexist uninsneveruninstall
 Source: contrib\win32\mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; 
AfterInstall: FileExpandString('{app}\Mercurial.ini')
 Source: ReleaseNotes.txt; DestDir: {app}; DestName: ReleaseNotes.txt
@@ -56,33 +66,34 @@ Source: ..\contrib\*.exe; DestDir: {app}
 Source: ..\contrib\*.dll; DestDir: {app}; Flags:
 Source: ..\contrib\TortoiseOverlays\*.*; DestDir: {app}/TortoiseOverlays;
 Source: contrib\refreshicons.cmd; DestDir: {app}/contrib
-Source: dist\*.exe; DestDir: {app}; Flags: ignoreversion restartreplace 
uninsrestartdelete
-Source: dist\*.dll; DestDir: {app}; Flags: ignoreversion restartreplace 
uninsrestartdelete
+Source: dist\*.exe; Excludes: "thgtaskbar.exe"; DestDir: {app}; Flags: 
ignoreversion
+Source: dist\thgtaskbar.exe; DestDir: {app}; Flags: ignoreversion; Components: 
shell
+Source: dist\*.dll; DestDir: {app}; Flags: ignoreversion
 Source: dist\library.zip; DestDir: {app}
-Source: doc\build\pdf\*.pdf; DestDir: {app}/docs; Flags:
-Source: doc\build\chm\*.chm; DestDir: {app}/docs; Flags:
+Source: doc\build\pdf\*.pdf; DestDir: {app}/docs; Flags: ; Components: help
+Source: doc\build\chm\*.chm; DestDir: {app}/docs; Flags: ; Components: help
 Source: icons\*; DestDir: {app}\icons; Flags: ignoreversion recursesubdirs 
createallsubdirs
 Source: dist\gtk\*; DestDir: {app}\gtk; Flags: ignoreversion recursesubdirs 
createallsubdirs
 Source: locale\*.*; DestDir: {app}\locale; Flags: recursesubdirs 
createallsubdirs
 Source: i18n\*.*; DestDir: {app}\i18n; Flags:
 Source: COPYING.txt; DestDir: {app}; DestName: Copying.txt
 Source: icons\thg_logo.ico; DestDir: {app}
-Source: ..\misc\hgbook.pdf; DestDir: {app}/docs
-Source: ..\misc\ThgShellx86.dll; DestDir: {app}; DestName: ThgShell.dll; 
Check: not Is64BitInstallMode; Flags: ignoreversion restartreplace 
uninsrestartdelete
-Source: ..\misc\ThgShellx64.dll; DestDir: {app}; DestName: ThgShell.dll; 
Check: Is64BitInstallMode; Flags: ignoreversion restartreplace 
uninsrestartdelete
+Source: ..\misc\hgbook.pdf; DestDir: {app}/docs ; Components: hgbook
+Source: ..\misc\ThgShellx86.dll; DestDir: {app}; DestName: ThgShell.dll; 
Check: not Is64BitInstallMode; Flags: ignoreversion restartreplace 
uninsrestartdelete; Components: shell
+Source: ..\misc\ThgShellx64.dll; DestDir: {app}; DestName: ThgShell.dll; 
Check: Is64BitInstallMode; Flags: ignoreversion restartreplace 
uninsrestartdelete; Components: shell
 
 [INI]
 Filename: {app}\Mercurial.url; Section: InternetShortcut; Key: URL; String: 
http://www.selenic.com/mercurial/
 Filename: {app}\TortoiseHg.url; Section: InternetShortcut; Key: URL; String: 
http://bitbucket.org/tortoisehg/stable/
 
 [Icons]
-Name: {group}\Start Taskbar App; Filename: {app}\thgtaskbar.exe
-Name: {group}\TortoiseHg Book (chm); Filename: {app}\docs\TortoiseHg.chm
-Name: {group}\TortoiseHg Book (pdf); Filename: {app}\docs\TortoiseHg.pdf
+Name: {group}\Start Taskbar App; Filename: {app}\thgtaskbar.exe; Components: 
shell
+Name: {group}\TortoiseHg Book (chm); Filename: {app}\docs\TortoiseHg.chm; 
Components: help
+Name: {group}\TortoiseHg Book (pdf); Filename: {app}\docs\TortoiseHg.pdf; 
Components: help
 Name: {group}\TortoiseHg Web Site; Filename: {app}\TortoiseHg.url
-Name: {group}\Mercurial Book; Filename: {app}\docs\hgbook.pdf
-Name: {group}\Mercurial Command Reference; Filename: {app}\docs\hg.1.html
-Name: {group}\Mercurial Config Reference; Filename: {app}\docs\hgrc.5.html
+Name: {group}\Mercurial Book; Filename: {app}\docs\hgbook.pdf; Components: 
hgbook
+Name: {group}\Mercurial Command Reference; Filename: {app}\docs\hg.1.html; 
Components: help
+Name: {group}\Mercurial Config Reference; Filename: {app}\docs\hgrc.5.html; 
Components: help
 Name: {group}\Mercurial Web Site; Filename: {app}\Mercurial.url
 Name: {group}\Uninstall TortoiseHg; Filename: {uninstallexe}
 
@@ -90,8 +101,8 @@ Name: {group}\Uninstall TortoiseHg; File
 ;Filename: {tmp}\vcredist_x86.exe; Parameters: /q; Check: ShouldInstallVCPPSP1 
and not Is64BitInstallMode
 ;Filename: {tmp}\vcredist_x64.exe; Parameters: /q; Check: ShouldInstallVCPPSP1 
and Is64BitInstallMode
 Filename: {app}\add_path.exe; Parameters: {app}; StatusMsg: Adding the 
installation path to the search path...
-Filename: msiexec.exe; Parameters: "/i 
""{app}\TortoiseOverlays\TortoiseOverlays-1.0.6.16523-win32.msi"" /qn 
/norestart ALLUSERS=1"; Check: not Is64BitInstallMode; StatusMsg: Installing 
TortoiseOverlays.dll ...
-Filename: msiexec.exe; Parameters: "/i 
""{app}\TortoiseOverlays\TortoiseOverlays-1.0.6.16523-x64.msi"" /qn /norestart 
ALLUSERS=1"; Check: Is64BitInstallMode; StatusMsg: Installing 
TortoiseOverlays.dll ...
+Filename: msiexec.exe; Parameters: "/i 
""{app}\TortoiseOverlays\TortoiseOverlays-1.0.6.16523-win32.msi"" /qn 
/norestart ALLUSERS=1"; Check: not Is64BitInstallMode; Components: shell; 
StatusMsg: Installing TortoiseOverlays.dll ...
+Filename: msiexec.exe; Parameters: "/i 
""{app}\TortoiseOverlays\TortoiseOverlays-1.0.6.16523-x64.msi"" /qn /norestart 
ALLUSERS=1"; Check: Is64BitInstallMode; Components: shell; StatusMsg: 
Installing TortoiseOverlays.dll ...
 
 [UninstallRun]
 Filename: {app}\add_path.exe; Parameters: /del {app}
@@ -171,24 +182,48 @@ begin
   end; 
 end; 
 
-function PrepareToInstall: String;
+function TerminateThgTaskbar(): Boolean;
 var
   TaskbarWindow: HWND;
   TaskbarMutex: String;
+  tries: Integer;
 begin
-  { Shut down the system tray if it is running }
+  { Terminate thgtaskbar.exe if it is running. Returns True, if successful }
   TaskbarMutex := 'thgtaskbar,Global\thgtaskbar';
-  if CheckForMutexes(TaskbarMutex) then
-  begin
-    Result := 'The installer was unable to shut down TortoiseHg, and will now 
close.';
+  tries := 0;
+  while (tries < 4) and CheckForMutexes(TaskbarMutex) do begin
     TaskbarWindow := FindWindowByWindowName('TortoiseHg RPC server');
     if TaskbarWindow <> 0 then
-    begin
       SendMessage(TaskbarWindow, wm_Close, 0, 0);
-      if not CheckForMutexes(TaskbarMutex) then
-        Result := '';
-    end;
-  end else Result := '';
-end;  
+    Sleep(3000 { ms });
+    tries := tries + 1;
+  end;
+  Result := not CheckForMutexes(TaskbarMutex);
+end;
+
+function PrepareToInstall: String;
+begin
+  if TerminateThgTaskbar() then
+    Result := ''
+  else
+    Result := 'The installer failed to shut down thgtaskbar.exe, and will now 
close.';
+end;
+
+procedure CurUninstallStepChanged(step: TUninstallStep);
+begin
+  if step = usAppMutexCheck then
+    TerminateThgTaskbar();
+end;
+
+function ShellInstallPossible(): Boolean;
+begin
+  if not IsAdminLoggedOn then begin
+    SuppressibleMsgBox(
+      'The shell integration install option (overlay icons, context menu) is 
unavailable (Administrator required)',
+      mbInformation, MB_OK, 0
+    );
+    Result := False;
+  end else Result := True;
+end;
 
 #include "registry.iss"
diff --git a/contrib/win32/registry.iss b/contrib/win32/registry.iss
--- a/contrib/win32/registry.iss
+++ b/contrib/win32/registry.iss
@@ -1,68 +1,66 @@
-[Registry]
-; rpc server autostart on logon
-Root: HKLM; Subkey: Software\Microsoft\Windows\CurrentVersion\Run; ValueType: 
string; ValueName: TortoiseHgRpcServer; Flags: uninsdeletevalue; ValueData: 
{app}\thgtaskbar.exe
-
-; register TortoiseHg config info
-Root: HKLM; Subkey: Software\TortoiseHgShell;  Flags: uninsdeletekey
-Root: HKLM; Subkey: Software\TortoiseHgShell;  ValueType: string; ValueName: ; 
ValueData: {app}
-Root: HKLM; Subkey: Software\TortoiseHg;  Flags: uninsdeletekey
-Root: HKLM; Subkey: Software\TortoiseHg;  ValueType: string; ValueName: ; 
ValueData: {app}
-
-; Icon handler COM controls
-;    Normal
-Root: HKCR; Subkey: CLSID\{{B456DBA0-7BF4-478c-937A-05130C2C212E}; Flags: 
uninsdeletekey
-Root: HKCR; Subkey: CLSID\{{B456DBA0-7BF4-478c-937A-05130C2C212E}; ValueType: 
string; ValueName: ; ValueData: TortoiseHg
-Root: HKCR; Subkey: 
CLSID\{{B456DBA0-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: 
string; ValueName: ; ValueData: {app}\THgShell.dll
-Root: HKCR; Subkey: 
CLSID\{{B456DBA0-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: 
string; ValueName: ThreadingModel; ValueData: Apartment
-
-;    Added
-Root: HKCR; Subkey: CLSID\{{B456DBA1-7BF4-478c-937A-05130C2C212E}; Flags: 
uninsdeletekey
-Root: HKCR; Subkey: CLSID\{{B456DBA1-7BF4-478c-937A-05130C2C212E}; ValueType: 
string; ValueName: ; ValueData: TortoiseHg
-Root: HKCR; Subkey: 
CLSID\{{B456DBA1-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: 
string; ValueName: ; ValueData: {app}\THgShell.dll
-Root: HKCR; Subkey: 
CLSID\{{B456DBA1-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: 
string; ValueName: ThreadingModel; ValueData: Apartment
-
-;   Modified
-Root: HKCR; Subkey: CLSID\{{B456DBA2-7BF4-478c-937A-05130C2C212E}; Flags: 
uninsdeletekey
-Root: HKCR; Subkey: CLSID\{{B456DBA2-7BF4-478c-937A-05130C2C212E}; ValueType: 
string; ValueName: ; ValueData: TortoiseHg
-Root: HKCR; Subkey: 
CLSID\{{B456DBA2-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: 
string; ValueName: ; ValueData: {app}\THgShell.dll
-Root: HKCR; Subkey: 
CLSID\{{B456DBA2-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: 
string; ValueName: ThreadingModel; ValueData: Apartment
-
-;   Unversioned
-Root: HKCR; Subkey: CLSID\{{B456DBA6-7BF4-478c-937A-05130C2C212E}; Flags: 
uninsdeletekey
-Root: HKCR; Subkey: CLSID\{{B456DBA6-7BF4-478c-937A-05130C2C212E}; ValueType: 
string; ValueName: ; ValueData: TortoiseHg
-Root: HKCR; Subkey: 
CLSID\{{B456DBA6-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: 
string; ValueName: ; ValueData: {app}\THgShell.dll
-Root: HKCR; Subkey: 
CLSID\{{B456DBA6-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: 
string; ValueName: ThreadingModel; ValueData: Apartment
-
-; The actual icon overlay handlers for Explorer
-Root: HKLM; Subkey: Software\TortoiseOverlays\Normal; ValueType: string; 
ValueName: TortoiseHg; ValueData: {{B456DBA0-7BF4-478c-937A-05130C2C212E}
-Root: HKLM; Subkey: Software\TortoiseOverlays\Added; ValueType: string; 
ValueName: TortoiseHg; ValueData: {{B456DBA1-7BF4-478c-937A-05130C2C212E}
-Root: HKLM; Subkey: Software\TortoiseOverlays\Modified; ValueType: string; 
ValueName: TortoiseHg; ValueData: {{B456DBA2-7BF4-478c-937A-05130C2C212E}
-Root: HKLM; Subkey: Software\TortoiseOverlays\Unversioned; ValueType: string; 
ValueName: TortoiseHg; ValueData: {{B456DBA6-7BF4-478c-937A-05130C2C212E}
-
-; Make them approved by administrator
-Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Shell 
Extensions\Approved; ValueType: string; ValueName: 
{{B456DBA0-7BF4-478c-937A-05130C2C212E}; ValueData: TortoiseHg; Flags: 
uninsdeletevalue
-Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Shell 
Extensions\Approved; ValueType: string; ValueName: 
{{B456DBA1-7BF4-478c-937A-05130C2C212E}; ValueData: TortoiseHg; Flags: 
uninsdeletevalue
-Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Shell 
Extensions\Approved; ValueType: string; ValueName: 
{{B456DBA2-7BF4-478c-937A-05130C2C212E}; ValueData: TortoiseHg; Flags: 
uninsdeletevalue
-Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Shell 
Extensions\Approved; ValueType: string; ValueName: 
{{B456DBA6-7BF4-478c-937A-05130C2C212E}; ValueData: TortoiseHg; Flags: 
uninsdeletevalue
-
-; Context menu handlers
-Root: HKCR; Subkey: Directory\shellex\ContextMenuHandlers\TortoiseHgCMenu; 
Flags: uninsdeletekey
-Root: HKCR; Subkey: Directory\shellex\ContextMenuHandlers\TortoiseHgCMenu; 
ValueType: string; ValueName: ; ValueData: 
{{B456DBA0-7BF4-478c-937A-05130C2C212E}
-
-Root: HKCR; Subkey: 
Directory\Background\shellex\ContextMenuHandlers\TortoiseHgCMenu; Flags: 
uninsdeletekey
-Root: HKCR; Subkey: 
Directory\Background\shellex\ContextMenuHandlers\TortoiseHgCMenu; ValueType: 
string; ValueName: ; ValueData: {{B456DBA0-7BF4-478c-937A-05130C2C212E}
-
-Root: HKCR; Subkey: Drive\shellex\ContextMenuHandlers\TortoiseHgCMenu; Flags: 
uninsdeletekey
-Root: HKCR; Subkey: Drive\shellex\ContextMenuHandlers\TortoiseHgCMenu; 
ValueType: string; ValueName: ; ValueData: 
{{B456DBA0-7BF4-478c-937A-05130C2C212E}
-
-Root: HKCR; Subkey: Folder\shellex\ContextMenuHandlers\TortoiseHgCMenu; Flags: 
uninsdeletekey
-Root: HKCR; Subkey: Folder\shellex\ContextMenuHandlers\TortoiseHgCMenu; 
ValueType: string; ValueName: ; ValueData: 
{{B456DBA0-7BF4-478c-937A-05130C2C212E}
-
-Root: HKCR; Subkey: *\shellex\ContextMenuHandlers\TortoiseHgCMenu; Flags: 
uninsdeletekey
-Root: HKCR; Subkey: *\shellex\ContextMenuHandlers\TortoiseHgCMenu; ValueType: 
string; ValueName: ; ValueData: {{B456DBA0-7BF4-478c-937A-05130C2C212E}
-
-Root: HKCR; Subkey: 
InternetShortcut\shellex\ContextMenuHandlers\TortoiseHgCMenu; Flags: 
uninsdeletekey
-Root: HKCR; Subkey: 
InternetShortcut\shellex\ContextMenuHandlers\TortoiseHgCMenu; ValueType: 
string; ValueName: ; ValueData: {{B456DBA0-7BF4-478c-937A-05130C2C212E}
-
-;Root: HKCR; Subkey: lnkfile\shellex\ContextMenuHandlers\TortoiseHgCMenu; 
Flags: uninsdeletekey
-;Root: HKCR; Subkey: lnkfile\shellex\ContextMenuHandlers\TortoiseHgCMenu; 
ValueType: string; ValueName: ; ValueData: 
{{B456DBA0-7BF4-478c-937A-05130C2C212E}
+[Registry]
+; rpc server autostart on logon
+Root: HKLM; Subkey: Software\Microsoft\Windows\CurrentVersion\Run; ValueType: 
string; ValueName: TortoiseHgRpcServer; Flags: uninsdeletevalue; ValueData: 
{app}\thgtaskbar.exe; Components: shell
+
+; register TortoiseHg config info
+Root: HKLM; Subkey: Software\TortoiseHgShell;  Flags: uninsdeletekey; 
Components: shell
+Root: HKLM; Subkey: Software\TortoiseHgShell;  ValueType: string; ValueName: ; 
ValueData: {app}; Components: shell
+Root: HKLM; Subkey: Software\TortoiseHg;  Flags: uninsdeletekey
+Root: HKLM; Subkey: Software\TortoiseHg;  ValueType: string; ValueName: ; 
ValueData: {app}
+
+; overlay handler COM controls
+;    Normal
+Root: HKCR; Subkey: CLSID\{{B456DBA0-7BF4-478c-937A-05130C2C212E}; Flags: 
uninsdeletekey; Components: shell
+Root: HKCR; Subkey: CLSID\{{B456DBA0-7BF4-478c-937A-05130C2C212E}; ValueType: 
string; ValueName: ; ValueData: TortoiseHg; Components: shell
+Root: HKCR; Subkey: 
CLSID\{{B456DBA0-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: 
string; ValueName: ; ValueData: {app}\THgShell.dll; Components: shell
+Root: HKCR; Subkey: 
CLSID\{{B456DBA0-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: 
string; ValueName: ThreadingModel; ValueData: Apartment; Components: shell
+
+;    Added
+Root: HKCR; Subkey: CLSID\{{B456DBA1-7BF4-478c-937A-05130C2C212E}; Flags: 
uninsdeletekey; Components: shell
+Root: HKCR; Subkey: CLSID\{{B456DBA1-7BF4-478c-937A-05130C2C212E}; ValueType: 
string; ValueName: ; ValueData: TortoiseHg; Components: shell
+Root: HKCR; Subkey: 
CLSID\{{B456DBA1-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: 
string; ValueName: ; ValueData: {app}\THgShell.dll; Components: shell
+Root: HKCR; Subkey: 
CLSID\{{B456DBA1-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: 
string; ValueName: ThreadingModel; ValueData: Apartment; Components: shell
+
+;   Modified
+Root: HKCR; Subkey: CLSID\{{B456DBA2-7BF4-478c-937A-05130C2C212E}; Flags: 
uninsdeletekey; Components: shell
+Root: HKCR; Subkey: CLSID\{{B456DBA2-7BF4-478c-937A-05130C2C212E}; ValueType: 
string; ValueName: ; ValueData: TortoiseHg; Components: shell
+Root: HKCR; Subkey: 
CLSID\{{B456DBA2-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: 
string; ValueName: ; ValueData: {app}\THgShell.dll; Components: shell
+Root: HKCR; Subkey: 
CLSID\{{B456DBA2-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: 
string; ValueName: ThreadingModel; ValueData: Apartment; Components: shell
+
+;   Unversioned
+Root: HKCR; Subkey: CLSID\{{B456DBA6-7BF4-478c-937A-05130C2C212E}; Flags: 
uninsdeletekey; Components: shell
+Root: HKCR; Subkey: CLSID\{{B456DBA6-7BF4-478c-937A-05130C2C212E}; ValueType: 
string; ValueName: ; ValueData: TortoiseHg; Components: shell
+Root: HKCR; Subkey: 
CLSID\{{B456DBA6-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: 
string; ValueName: ; ValueData: {app}\THgShell.dll; Components: shell
+Root: HKCR; Subkey: 
CLSID\{{B456DBA6-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: 
string; ValueName: ThreadingModel; ValueData: Apartment; Components: shell
+
+; The actual icon overlay handlers for Explorer
+Root: HKLM; Subkey: Software\TortoiseOverlays\Normal; ValueType: string; 
ValueName: TortoiseHg; ValueData: {{B456DBA0-7BF4-478c-937A-05130C2C212E}; 
Components: shell
+Root: HKLM; Subkey: Software\TortoiseOverlays\Added; ValueType: string; 
ValueName: TortoiseHg; ValueData: {{B456DBA1-7BF4-478c-937A-05130C2C212E}; 
Components: shell
+Root: HKLM; Subkey: Software\TortoiseOverlays\Modified; ValueType: string; 
ValueName: TortoiseHg; ValueData: {{B456DBA2-7BF4-478c-937A-05130C2C212E}; 
Components: shell
+Root: HKLM; Subkey: Software\TortoiseOverlays\Unversioned; ValueType: string; 
ValueName: TortoiseHg; ValueData: {{B456DBA6-7BF4-478c-937A-05130C2C212E}; 
Components: shell
+
+; Make them approved by administrator
+Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Shell 
Extensions\Approved; ValueType: string; ValueName: 
{{B456DBA0-7BF4-478c-937A-05130C2C212E}; ValueData: TortoiseHg; Flags: 
uninsdeletevalue; Components: shell
+Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Shell 
Extensions\Approved; ValueType: string; ValueName: 
{{B456DBA1-7BF4-478c-937A-05130C2C212E}; ValueData: TortoiseHg; Flags: 
uninsdeletevalue; Components: shell
+Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Shell 
Extensions\Approved; ValueType: string; ValueName: 
{{B456DBA2-7BF4-478c-937A-05130C2C212E}; ValueData: TortoiseHg; Flags: 
uninsdeletevalue; Components: shell
+Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Shell 
Extensions\Approved; ValueType: string; ValueName: 
{{B456DBA6-7BF4-478c-937A-05130C2C212E}; ValueData: TortoiseHg; Flags: 
uninsdeletevalue; Components: shell
+
+; Context menu handlers
+Root: HKCR; Subkey: Directory\shellex\ContextMenuHandlers\TortoiseHgCMenu; 
Flags: uninsdeletekey; Components: shell
+Root: HKCR; Subkey: Directory\shellex\ContextMenuHandlers\TortoiseHgCMenu; 
ValueType: string; ValueName: ; ValueData: 
{{B456DBA0-7BF4-478c-937A-05130C2C212E}; Components: shell
+
+Root: HKCR; Subkey: 
Directory\Background\shellex\ContextMenuHandlers\TortoiseHgCMenu; Flags: 
uninsdeletekey; Components: shell
+Root: HKCR; Subkey: 
Directory\Background\shellex\ContextMenuHandlers\TortoiseHgCMenu; ValueType: 
string; ValueName: ; ValueData: {{B456DBA0-7BF4-478c-937A-05130C2C212E}; 
Components: shell
+
+Root: HKCR; Subkey: Drive\shellex\ContextMenuHandlers\TortoiseHgCMenu; Flags: 
uninsdeletekey; Components: shell
+Root: HKCR; Subkey: Drive\shellex\ContextMenuHandlers\TortoiseHgCMenu; 
ValueType: string; ValueName: ; ValueData: 
{{B456DBA0-7BF4-478c-937A-05130C2C212E}; Components: shell
+
+Root: HKCR; Subkey: Folder\shellex\ContextMenuHandlers\TortoiseHgCMenu; Flags: 
uninsdeletekey; Components: shell
+Root: HKCR; Subkey: Folder\shellex\ContextMenuHandlers\TortoiseHgCMenu; 
ValueType: string; ValueName: ; ValueData: 
{{B456DBA0-7BF4-478c-937A-05130C2C212E}; Components: shell
+
+Root: HKCR; Subkey: *\shellex\ContextMenuHandlers\TortoiseHgCMenu; Flags: 
uninsdeletekey; Components: shell
+Root: HKCR; Subkey: *\shellex\ContextMenuHandlers\TortoiseHgCMenu; ValueType: 
string; ValueName: ; ValueData: {{B456DBA0-7BF4-478c-937A-05130C2C212E}; 
Components: shell
+
+Root: HKCR; Subkey: 
InternetShortcut\shellex\ContextMenuHandlers\TortoiseHgCMenu; Flags: 
uninsdeletekey; Components: shell
+Root: HKCR; Subkey: 
InternetShortcut\shellex\ContextMenuHandlers\TortoiseHgCMenu; ValueType: 
string; ValueName: ; ValueData: {{B456DBA0-7BF4-478c-937A-05130C2C212E}; 
Components: shell
+

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to