Hi,

On Thu, 24 Jan 2008, Kirill wrote:

> They may be useful if the installation is allowed for users without 
> Administrator privileges.

Nice.

> 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]

Could you just implement that as a follow-up patch (and not put it into 
this commit message)?

> +install-user: all install-user.reg
> +     regsvr32 -s git_shell_ext.dll
> +     regedit -s install.reg

Certainly, you meant "install-user.reg" here, right?  It would be even 
easier if you wrote it like this:

install-user: install-user.reg all
        regsvr32 -s $(TARGET)
        regedit -s $<

>  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)|'

How about just unifying them?

%.reg: %.reg.in Makefile
        sed < $< > $@ \
                -e 's|@@MSYSGIT_PATH@@|$(MSYSGIT_PATH)|' \
                -e 's|@@DLL_PATH@@|$(DLL_PATH)|'

> 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);

Hmm.  I could imagine that the user-specific setting should override the 
system-wide setting, i.e. the order should be switched around...

Thanks,
Dscho

Reply via email to