Uninstalling FinForge
This guide explains how to reverse FinForge setup actions using the uninstall scripts.
Purpose
FinForge setup creates and configures environment components such as:
- Project virtual environment (
.venv) - xlwings Excel add-in (current Windows user)
- xlwings user configuration (
%USERPROFILE%\.xlwings\xlwings.conf) - Generated workbook (
FinForge.xlsm) if created from template - Setup temp files (
%SystemDrive%\fftmp)
The uninstall flow lets you remove these items interactively.
Files Involved
uninstall.batInstallation/unconfigure_xlwings.ps1
How It Works
1) uninstall.bat
Main interactive uninstall wizard.
Behavior
- Prompts for confirmation before uninstall starts
- Asks what to remove using Yes/No questions
- Executes cleanup in ordered steps
- Shows warnings for partial failures and continues where possible
Cleanup Steps
- Remove xlwings add-in (
xlwings addin remove) if selected - Run
Installation/unconfigure_xlwings.ps1if selected - Remove
.venvfolder if selected - Delete
FinForge.xlsmif selected - Delete
Temporary/launch_diagnostics.logif selected - Delete
%SystemDrive%\fftmpif selected
Internal Routines
-
:prompt_yes_no- Input:
- Question text (string)
- Default answer (
YorN) - Output variable name
- Output:
- Sets target variable to
YorN
- Sets target variable to
- Input:
-
:remove_xlwings_addin- Input: none
- Output:
- Attempts add-in removal if xlwings command is available
- Returns success even when skipped
2) Installation/unconfigure_xlwings.ps1
Safe xlwings config remover.
Behavior
- Reads
%USERPROFILE%\.xlwings\xlwings.conf - Parses
INTERPRETER_WINandPYTHONPATH - Removes config only if it points to the current project directory
- Leaves unrelated xlwings configuration untouched
- Removes
%USERPROFILE%\.xlwingsonly when empty
Parameters
-ProjectDir(string, optional)- Project root path
- If omitted, script derives it from its own location
Output
- Exit code
0for success/skip - Exit code
1only for unexpected script errors
Usage
Recommended (Explorer)
- Open the project folder
- Double-click
uninstall.bat - Answer each prompt
Command Line
cd C:\FinForge
./uninstall.bat
What Is Not Removed
Uninstall intentionally does not delete:
- Source code files
- Guides and documentation
- Project structure
- Downloaded Python installation itself
This keeps the repository reusable after uninstall.
Assumptions and Limitations
- Windows-only flow (batch and PowerShell scripts)
- xlwings add-in removal is user-scoped
- Workbook deletion is optional because it may contain user edits
- If files are locked (for example by Excel), deletion can fail with a warning
Reinstall
To install again after uninstall:
- Run
setup.bat - Launch with
launch_finforge.bat