Skip to content

Commit 513f0b5

Browse files
kovtcharovclaude
andcommitted
feat(installer): optional data cleanup checkbox in Windows uninstaller
Add a Yes/No MessageBox to the NSIS customUnInstall macro that offers to remove ~/.gaia/ (chats, documents, Python venv, config, logs) during uninstall. Default is No so users keep their data unless they explicitly opt in. Silent uninstalls (/SD IDNO) also default to keeping data. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7e92824 commit 513f0b5

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

installer/nsis/installer.nsh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,21 @@
6969
!macro customUnInstall
7070
DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" \
7171
"${PRODUCT_NAME}"
72+
; Also clean up the old pre-rename autostart key in case the user
73+
; is uninstalling without ever having upgraded through the rename.
74+
DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" \
75+
"GAIA Agent UI"
76+
77+
; Offer to remove user data (~/.gaia/) — chats, documents, Python venv,
78+
; config, and logs. Default is "No" so users keep their data unless they
79+
; explicitly opt in. /SD IDNO makes silent uninstalls (GPO/SCCM) keep
80+
; data by default.
81+
;
82+
; Uses a relative jump (IDNO +2) instead of named labels to avoid
83+
; label-collision risk if electron-builder ever expands this macro
84+
; more than once.
85+
MessageBox MB_YESNO|MB_ICONQUESTION \
86+
"Also remove your GAIA data (chats, documents, Python environment)?$\r$\n$\r$\nThis cannot be undone." \
87+
/SD IDNO IDNO +2
88+
RmDir /r "$PROFILE\.gaia"
7289
!macroend

0 commit comments

Comments
 (0)