[GH-ISSUE #89] Improve UNINSTALL logic #25

Closed
opened 2026-10-31 22:07:50 +00:00 by bsakaguchi · 3 comments
Owner

Originally created by @robinjhuang on GitHub (Oct 15, 2024).
Original GitHub issue: https://github.com/Comfy-Org/desktop/issues/89

Originally assigned to: @oto-ciulis-tt on GitHub.

Add custom uninstall logic to Windows NSIS:

  1. Should delete the extra_model_config.yaml file. This is always saved to app.getPath('userData').

Bonus: Read the file and the python environment located at "base_path". For example, it should delete everything under /Users/junhanhuang/Documents/ComfyUI/.venv and /Users/junhanhuang/Documents/ComfyUI/uv-cache

eg.

# ComfyUI extra_model_paths.yaml for darwin
comfyui:
  base_path: /Users/junhanhuang/Documents/ComfyUI
  is_default: true
  checkpoints: models/checkpoints/
  classifiers: models/classifiers/
  clip: models/clip/
  clip_vision: models/clip_vision/
  configs: models/configs/
  controlnet: models/controlnet/
  diffusers: models/diffusers/
  diffusion_models: models/diffusion_models/
  embeddings: models/embeddings/
  gligen: models/gligen/
  hypernetworks: models/hypernetworks/
  loras: models/loras/
  photomaker: models/photomaker/
  style_models: models/style_models/
  unet: models/unet/
  upscale_models: models/upscale_models/
  vae: models/vae/
  vae_approx: models/vae_approx/
  custom_nodes: custom_nodes/

A development script that does this already exists in: github.com/Comfy-Org/electron@8e55f5593a

Originally created by @robinjhuang on GitHub (Oct 15, 2024). Original GitHub issue: https://github.com/Comfy-Org/desktop/issues/89 Originally assigned to: @oto-ciulis-tt on GitHub. Add custom uninstall logic to Windows NSIS: 1. Should delete the `extra_model_config.yaml` file. This is always saved to `app.getPath('userData')`. Bonus: Read the file and the python environment located at "base_path". For example, it should delete everything under `/Users/junhanhuang/Documents/ComfyUI/.venv` and `/Users/junhanhuang/Documents/ComfyUI/uv-cache` eg. ``` # ComfyUI extra_model_paths.yaml for darwin comfyui: base_path: /Users/junhanhuang/Documents/ComfyUI is_default: true checkpoints: models/checkpoints/ classifiers: models/classifiers/ clip: models/clip/ clip_vision: models/clip_vision/ configs: models/configs/ controlnet: models/controlnet/ diffusers: models/diffusers/ diffusion_models: models/diffusion_models/ embeddings: models/embeddings/ gligen: models/gligen/ hypernetworks: models/hypernetworks/ loras: models/loras/ photomaker: models/photomaker/ style_models: models/style_models/ unet: models/unet/ upscale_models: models/upscale_models/ vae: models/vae/ vae_approx: models/vae_approx/ custom_nodes: custom_nodes/ ``` A development script that does this already exists in: https://github.com/Comfy-Org/electron/commit/8e55f5593a432cbd73155e5b288825fa7c1b35e5
bsakaguchi 2026-10-31 22:07:50 +00:00
  • closed this issue
  • added the
    V1
    label
Author
Owner

@robinjhuang commented on GitHub (Nov 8, 2024):

From Dave:

Yes, you can add something like this:
!macro customUnInstall
ExecWait "del /f C:\Some\Path"
!macroend
https://www.npmjs.com/package/@todesktop/cli#windowsnsisinclude---optional-string

<!-- gh-comment-id:2463555819 --> @robinjhuang commented on GitHub (Nov 8, 2024): From Dave: Yes, you can add something like this: !macro customUnInstall ExecWait "del /f C:\Some\Path" !macroend https://www.npmjs.com/package/@todesktop/cli#windowsnsisinclude---optional-string
Author
Owner

@robinjhuang commented on GitHub (Nov 17, 2024):

Can we encompass this logic as a function that we can expose in the Electron API as "resetInstall" command?

Needed in: rg/electron/issues/270

We want to add this as a button you can click when an error occurs...

<!-- gh-comment-id:2480902033 --> @robinjhuang commented on GitHub (Nov 17, 2024): Can we encompass this logic as a function that we can expose in the Electron API as "resetInstall" command? Needed in: [rg/electron/issues/270](https://github.com/Comfy-Org/electron/issues/270) We want to add this as a button you can click when an error occurs...
Author
Owner

@robinjhuang commented on GitHub (Nov 26, 2024):

https://github.com/Comfy-Org/desktop/pull/279

<!-- gh-comment-id:2499522308 --> @robinjhuang commented on GitHub (Nov 26, 2024): https://github.com/Comfy-Org/desktop/pull/279
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/desktop#25
No description provided.