Skip to content

Commit

Permalink
Fix reg delete (#6550)
Browse files Browse the repository at this point in the history
* fix issue with 64 bit registry

* fix issue with 64 bit registry
  • Loading branch information
mattdurham authored Feb 28, 2024
1 parent 92d888e commit c6fbc92
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ v0.40.0 (2024-02-27)

- Fix an issue where changing the configuration of `loki.write` would cause a panic. (@rfratto)

- Fix issue where registry was not being properly deleted. (@mattdurham)

### Other changes

- Removed support for Windows 2012 in line with Microsoft end of life. (@mattdurham)
Expand Down
6 changes: 4 additions & 2 deletions packaging/grafana-agent-flow/windows/install_script.nsis
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ Section "uninstall"
RMDir /r "$APPDATA\${APPNAME}" # Application data.

# Remove service and uninstaller information from the registry.
DeleteRegKey HKLM "Software\Grafana\Grafana Agent Flow"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
nsExec::ExecToLog 'Reg.exe delete "HKLM\SOFTWARE\Grafana\Grafana Agent Flow" /reg:64 /f'
Pop $0
nsExec::ExecToLog 'Reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" /reg:64 /f'
Pop $0
SectionEnd
5 changes: 3 additions & 2 deletions packaging/grafana-agent/windows/install_script.nsis
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ Section "uninstall"

RMDir /r $APPDATA\grafana-agent-wal

# Remove uninstaller information from the registry
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
# Remove service and uninstaller information from the registry.
nsExec::ExecToLog 'Reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" /reg:64 /f'
Pop $0
SectionEnd

0 comments on commit c6fbc92

Please sign in to comment.