They may be useful if the installation is allowed for users without
Administrator privileges.
In addition, the following two might be interesting as per "Debugging
with the Shell" on MSDN:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]
DesktopProcess= 1
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\
AlwaysUnloadDll]
---
Makefile | 13 +++++++++++
install-user.reg.in | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++
systeminfo.c | 6 +++++
uninstall-user.reg | 27 +++++++++++++++++++++++
4 files changed, 104 insertions(+), 0 deletions(-)
create mode 100644 install-user.reg.in
create mode 100644 uninstall-user.reg
diff --git a/Makefile b/Makefile
index 6c5d576..0513fec 100644
--- a/Makefile
+++ b/Makefile
@@ -27,14 +27,27 @@ install: all install.reg
regsvr32 -s git_shell_ext.dll
regedit -s install.reg
+install-user: all install-user.reg
+ regsvr32 -s git_shell_ext.dll
+ regedit -s install.reg
+
uninstall:
regsvr32 -u -s git_shell_ext.dll
regedit -s uninstall.reg
+uninstall-user:
+ regsvr32 -u -s git_shell_ext.dll
+ regedit -s uninstall-user.reg
+
install.reg: install.reg.in Makefile
sed < $< > $@ \
-e 's|@@MSYSGIT_PATH@@|$(MSYSGIT_PATH)|' \
-e 's|@@DLL_PATH@@|$(DLL_PATH)|'
+install-user.reg: install-user.reg.in Makefile
+ sed < $< > $@ \
+ -e 's|@@MSYSGIT_PATH@@|$(MSYSGIT_PATH)|' \
+ -e 's|@@DLL_PATH@@|$(DLL_PATH)|'
+
clean:
-rm -f $(OBJECTS) $(TARGET)
diff --git a/install-user.reg.in b/install-user.reg.in
new file mode 100644
index 0000000..8231510
--- /dev/null
+++ b/install-user.reg.in
@@ -0,0 +1,58 @@
+Windows Registry Editor Version 5.00
+
+; This registry file creates neccessary entries for installation.
+; **** If you change this file, keep uninstall.reg in sync! ****
+;
+; This file is slated for being generated and not hard-coded.
+
+[HKEY_CURRENT_USER\SOFTWARE\Git-Cheetah]
+
+[HKEY_CURRENT_USER\SOFTWARE\Git-Cheetah]
+"PathToMsys"="@@MSYSGIT_PATH@@"
+
+[HKEY_CURRENT_USER\Software\Classes\CLSID\{ca586c80-7c84-4b88-8537-726724df6929}]
+
+[HKEY_CURRENT_USER\Software\Classes\CLSID\{ca586c80-7c84-4b88-8537-726724df6929}]
[EMAIL PROTECTED]"Git-Cheetah"
+
+[HKEY_CURRENT_USER\Software\Classes\CLSID\{ca586c80-7c84-4b88-8537-726724df6929}\InProcServer32]
[EMAIL PROTECTED]"@@DLL_PATH@@"
+
+[HKEY_CURRENT_USER\Software\Classes\CLSID\{ca586c80-7c84-4b88-8537-726724df6929}\InProcServer32]
+"ThreadingModel"="Apartment"
+
+[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell
Extensions\Approved]
+"{ca586c80-7c84-4b88-8537-726724df6929}"="Git-Cheetah"
+
+[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell
Extensions\Approved\{ca586c80-7c84-4b88-8537-726724df6929}]
[EMAIL PROTECTED]"Git-Cheetah"
+
+[HKEY_CURRENT_USER\Software\Classes\*\shellex\ContextMenuHandlers\Git-Cheetah]
+
+[HKEY_CURRENT_USER\Software\Classes\*\shellex\ContextMenuHandlers\Git-Cheetah]
[EMAIL PROTECTED]"{ca586c80-7c84-4b88-8537-726724df6929}"
+
+[HKEY_CURRENT_USER\Software\Classes\Directory\shellex\ContextMenuHandlers\Git-Cheetah]
+
+[HKEY_CURRENT_USER\Software\Classes\Directory\shellex\ContextMenuHandlers\Git-Cheetah]
[EMAIL PROTECTED]"{ca586c80-7c84-4b88-8537-726724df6929}"
+
+[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shellex\ContextMenuHandlers\Git-Cheetah]
+
+[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shellex\ContextMenuHandlers\Git-Cheetah]
[EMAIL PROTECTED]"{ca586c80-7c84-4b88-8537-726724df6929}"
+
+[HKEY_CURRENT_USER\Software\Classes\Drive\shellex\ContextMenuHandlers\Git-Cheetah]
+
+[HKEY_CURRENT_USER\Software\Classes\Drive\shellex\ContextMenuHandlers\Git-Cheetah]
[EMAIL PROTECTED]"{ca586c80-7c84-4b88-8537-726724df6929}"
+
+[HKEY_CURRENT_USER\Software\Classes\Folder\shellex\ContextMenuHandlers\Git-Cheetah]
+
+[HKEY_CURRENT_USER\Software\Classes\Folder\shellex\ContextMenuHandlers\Git-Cheetah]
[EMAIL PROTECTED]"{ca586c80-7c84-4b88-8537-726724df6929}"
+
+[HKEY_CURRENT_USER\Software\Classes\InternetShortcut\shellex\ContextMenuHandlers\Git-Cheetah]
+
+[HKEY_CURRENT_USER\Software\Classes\InternetShortcut\shellex\ContextMenuHandlers\Git-Cheetah]
[EMAIL PROTECTED]"{ca586c80-7c84-4b88-8537-726724df6929}"
diff --git a/systeminfo.c b/systeminfo.c
index 08429bf..388faf3 100644
--- a/systeminfo.c
+++ b/systeminfo.c
@@ -16,6 +16,12 @@ TCHAR * msys_path(void)
lRet = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
TEXT(GIT_CHEETAH_REG_PATH),
0, KEY_QUERY_VALUE, &hKey);
+
+ /* If we failed to find it in the machine-wide, try current user */
+ if (ERROR_SUCCESS != lRet)
+ lRet = RegOpenKeyEx(HKEY_CURRENT_USER,
+ TEXT(GIT_CHEETAH_REG_PATH),
+ 0, KEY_QUERY_VALUE, &hKey);
if (lRet == ERROR_SUCCESS)
{
diff --git a/uninstall-user.reg b/uninstall-user.reg
new file mode 100644
index 0000000..4d69f3f
--- /dev/null
+++ b/uninstall-user.reg
@@ -0,0 +1,27 @@
+Windows Registry Editor Version 5.00
+
+; This registry file creates neccessary entries for uninstallation.
+; **** If you change this file, keep install.reg in sync! ****
+;
+; This file is slated for being generated and not hard-coded.
+
+[-HKEY_CURRENT_USER\SOFTWARE\Git-Cheetah]
+
+[-HKEY_CURRENT_USER\Software\Classes\CLSID\{ca586c80-7c84-4b88-8537-726724df6929}]
+
+[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell
Extensions\Approved]
+"{ca586c80-7c84-4b88-8537-726724df6929}"=-
+
+[-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell
Extensions\Approved\{ca586c80-7c84-4b88-8537-726724df6929}]
+
+[-HKEY_CURRENT_USER\Software\Classes\*\shellex\ContextMenuHandlers\Git-Cheetah]
+
+[-HKEY_CURRENT_USER\Software\Classes\Directory\shellex\ContextMenuHandlers\Git-Cheetah]
+
+[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shellex\ContextMenuHandlers\Git-Cheetah]
+
+[-HKEY_CURRENT_USER\Software\Classes\Drive\shellex\ContextMenuHandlers\Git-Cheetah]
+
+[-HKEY_CURRENT_USER\Software\Classes\Folder\shellex\ContextMenuHandlers\Git-Cheetah]
+
+[-HKEY_CURRENT_USER\Software\Classes\InternetShortcut\shellex\ContextMenuHandlers\Git-Cheetah]
--
1.5.4.rc0.929.g50e2