Skip to content

Error creating registry key if installing as local user #455

Closed

Description

@kjeremy

In 2.6.0 I get a message box that pops up during install:

untitled

My guess is that in this case the registry keys need to be written under HKEY_CURRENT_USER.

Activity

  1. linquize commented on Sep 30, 2015

    @linquize

    Do you have necessary registry write permission?

  2. kjeremy commented on Sep 30, 2015

    @kjeremy
    Author

    No because this is an install for the user, not an admin account or global install.

  3. dakotahawkins commented on Sep 30, 2015

    @dakotahawkins

    I had the same issue. It should be on the installer to detect whether it has permission to do that or to prompt for elevation.

  4. kjeremy commented on Sep 30, 2015

    @kjeremy
    Author

    No it shouldn't prompt for elevation unless it's a machine wide install (which it does already if you run as admin). If installed for a single user the keys have to go into HKCU.

  5. dscho commented on Sep 30, 2015

    @dscho
    Member

    I guess we need this in https://github.com/git-for-windows/build-extra/blob/master/installer/install.iss.in:

    diff --git a/installer/install.iss.in b/installer/install.iss.in
    index 1f7bbe4..10d16d3 100644
    --- a/installer/install.iss.in
    +++ b/installer/install.iss.in
    @@ -98,9 +98,12 @@ SetupWindowTitle={#APP_NAME} {#APP_VERSION} Setup
    
     [Registry]
     ; Aides installing third-party (credential, remote, etc) helpers
    -Root: HKLM; Subkey: Software\GitForWindows; ValueType: string; ValueName: CurrentVersion; ValueData: {#APP_VERSION}; Flags: uninsdeletevalue uninsdeletekeyifempty
    -Root: HKLM; Subkey: Software\GitForWindows; ValueType: string; ValueName: InstallPath; ValueData: {app}; Flags: uninsdeletevalue uninsdeletekeyifempty
    -Root: HKLM; Subkey: Software\GitForWindows; ValueType: string; ValueName: LibexecPath; ValueData: {app}\{#MINGW_BITNESS}\libexec\git-core; Flags: uninsdeletevalue uninsdeletekeyifempty
    +Root: HKLM; Subkey: Software\GitForWindows; ValueType: string; ValueName: CurrentVersion; ValueData: {#APP_VERSION}; Flags: uninsdeletevalue uninsdeletekeyifempty; Check: IsAdminLoggedOn
    +Root: HKLM; Subkey: Software\GitForWindows; ValueType: string; ValueName: InstallPath; ValueData: {app}; Flags: uninsdeletevalue uninsdeletekeyifempty; Check: IsAdminLoggedOn
    +Root: HKLM; Subkey: Software\GitForWindows; ValueType: string; ValueName: LibexecPath; ValueData: {app}\{#MINGW_BITNESS}\libexec\git-core; Flags: uninsdeletevalue uninsdeletekeyifempty; Check: IsAdminLoggedOn
    +Root: HKCU; Subkey: Software\GitForWindows; ValueType: string; ValueName: CurrentVersion; ValueData: {#APP_VERSION}; Flags: uninsdeletevalue uninsdeletekeyifempty; Check: not IsAdminLoggedOn
    +Root: HKCU; Subkey: Software\GitForWindows; ValueType: string; ValueName: InstallPath; ValueData: {app}; Flags: uninsdeletevalue uninsdeletekeyifempty; Check: not IsAdminLoggedOn
    +Root: HKCU; Subkey: Software\GitForWindows; ValueType: string; ValueName: LibexecPath; ValueData: {app}\{#MINGW_BITNESS}\libexec\git-core; Flags: uninsdeletevalue uninsdeletekeyifempty; Check: not IsAdminLoggedOn
    
     ; There is no "Console" key in HKLM.
     Root: HKCU; Subkey: Console; ValueType: string; ValueName: FaceName; ValueData: Lucida Console; Flags: uninsclearvalue; Components: consolefont
  6. dscho commented on Sep 30, 2015

    @dscho
    Member

    Please test this installer.

  7. self-assigned this
    on Sep 30, 2015
  8. dscho commented on Oct 1, 2015

    @dscho
    Member
  9. kjeremy commented on Oct 1, 2015

    @kjeremy
    Author

    @dscho It works correctly and puts the keys in HKCU.

  10. dscho commented on Oct 1, 2015

    @dscho
    Member

    Thanks, @kjeremy.

  11. added a commit that references this issue on Oct 27, 2021
  12. added 2 commits that reference this issue on Nov 10, 2021
  13. added 2 commits that reference this issue on Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions