[GH-ISSUE #140] [Feature Request] Configurable uninstall executable/command #75

Open
opened 2026-02-17 17:12:01 -05:00 by yindo · 2 comments
Owner

Originally created by @Jeansy91 on GitHub (Sep 4, 2025).
Original GitHub issue: https://github.com/Drop-OSS/drop-app/issues/140

I have many “setup-only” games that I want to add to my Drop instance.
To ensure that they can be launched, I wrote a script that accepts a --setup or --launch parameter and executes the "installer.exe" or the “game.exe” in the installation directory. This all works fine.
However, when I uninstall the game from the Drop client, the files are simply deleted. This means that the game is not uninstalled “correctly” and for instance, Windows still thinks that it is installed.

It would be nice if there was a way to configure an “uninstall executable/command” that is executed before the folder is removed. This would allow previously installed games to be uninstalled correctly.

The alternative at the moment is to pre-install the game and use the installation directory instead of the installer for Drop. However, this is very time-consuming.

Originally created by @Jeansy91 on GitHub (Sep 4, 2025). Original GitHub issue: https://github.com/Drop-OSS/drop-app/issues/140 I have many “setup-only” games that I want to add to my Drop instance. To ensure that they can be launched, I wrote a script that accepts a `--setup` or `--launch` parameter and executes the "installer.exe" or the “game.exe” in the installation directory. This all works fine. However, when I uninstall the game from the Drop client, the files are simply deleted. This means that the game is not uninstalled “correctly” and for instance, Windows still thinks that it is installed. It would be nice if there was a way to configure an “uninstall executable/command” that is executed before the folder is removed. This would allow previously installed games to be uninstalled correctly. The alternative at the moment is to pre-install the game and use the installation directory instead of the installer for Drop. However, this is very time-consuming.
Author
Owner

@nS-Gecko commented on GitHub (Jan 3, 2026):

@Jeansy91 , would you care to share your custom script? I also created a simple .bat file that would sit on the install folder of my setup-only games to run it by searching system-wide a specific .exe file but that’s not a smooth experience and indeed, upon uninstalling the game, only the install folder is removed.

@nS-Gecko commented on GitHub (Jan 3, 2026): @Jeansy91 , would you care to share your custom script? I also created a simple .bat file that would sit on the install folder of my setup-only games to run it by searching system-wide a specific .exe file but that’s not a smooth experience and indeed, upon uninstalling the game, only the install folder is removed.
Author
Owner

@Jeansy91 commented on GitHub (Jan 5, 2026):

I should mention that I use the script explicitly for GOG games. It must be customized individually for each game.
However, it could be modified to use parameters for GAME_DIR, SETUP_EXEand LAUNCH EXE.
It's not the smoothest experience either, as installations can take a long time and double the hard drive space is required during installation. But it's sufficient for me at the moment, as I didn't want to install every game and then have to pack the game files.

@echo off
rem Simple dispatcher: run either LAUNCH_EXE or SETUP_EXE based on --launch / --setup
rem Edit the paths below to your actual executables

set "GAME_DIR=./Example Game"
set "SETUP_EXE=./Example Game Setup.exe"
set "LAUNCH_EXE=%GAME_DIR%/Example Game.exe"

set "SETUP_PARAMS=/VERYSILENT /DIR=""%GAME_DIR%/"""

if "%~1"=="" goto usage

set "MODE=%~1"
if /I "%MODE%"=="--launch" (
    shift
    if not exist "%LAUNCH_EXE%" (
        echo Error: "%LAUNCH_EXE%" not found.
        exit /b 2
    )
    echo Starting launch: "%LAUNCH_EXE%" %*
    "%LAUNCH_EXE%" %*
    exit /b %ERRORLEVEL%
) else (
    if /I "%MODE%"=="--setup" (
        shift
        if not exist "%SETUP_EXE%" (
            echo Error: "%SETUP_EXE%" not found.
            exit /b 3
        )
        echo Starting setup: "%SETUP_EXE%" %SETUP_PARAMS% %*
        "%SETUP_EXE%" %SETUP_PARAMS% %*
        set "LASTEXIT=%ERRORLEVEL%"

        rem Attempt to delete the setup file
        if exist "%SETUP_EXE%" (
            echo Attempting to delete setup file: "%SETUP_EXE%"
            del /F /Q "%SETUP_EXE%" 2>nul
            if exist "%SETUP_EXE%" (
                echo Deletion failed - file remains.
            ) else (
                echo Setup file deleted.
            )
        )

        exit /b %LASTEXIT%
    ) else (
        echo Unknown parameter: %MODE%
        goto usage
    )
)

:usage
echo Usage: %~nx0 --launch [args...] ^| --setup [args...]
exit /b 1
@Jeansy91 commented on GitHub (Jan 5, 2026): I should mention that I use the script explicitly for GOG games. It must be customized individually for each game. However, it could be modified to use parameters for `GAME_DIR`, `SETUP_EXE`and `LAUNCH EXE`. It's not the smoothest experience either, as installations can take a long time and double the hard drive space is required during installation. But it's sufficient for me at the moment, as I didn't want to install every game and then have to pack the game files. ```BATCH @echo off rem Simple dispatcher: run either LAUNCH_EXE or SETUP_EXE based on --launch / --setup rem Edit the paths below to your actual executables set "GAME_DIR=./Example Game" set "SETUP_EXE=./Example Game Setup.exe" set "LAUNCH_EXE=%GAME_DIR%/Example Game.exe" set "SETUP_PARAMS=/VERYSILENT /DIR=""%GAME_DIR%/""" if "%~1"=="" goto usage set "MODE=%~1" if /I "%MODE%"=="--launch" ( shift if not exist "%LAUNCH_EXE%" ( echo Error: "%LAUNCH_EXE%" not found. exit /b 2 ) echo Starting launch: "%LAUNCH_EXE%" %* "%LAUNCH_EXE%" %* exit /b %ERRORLEVEL% ) else ( if /I "%MODE%"=="--setup" ( shift if not exist "%SETUP_EXE%" ( echo Error: "%SETUP_EXE%" not found. exit /b 3 ) echo Starting setup: "%SETUP_EXE%" %SETUP_PARAMS% %* "%SETUP_EXE%" %SETUP_PARAMS% %* set "LASTEXIT=%ERRORLEVEL%" rem Attempt to delete the setup file if exist "%SETUP_EXE%" ( echo Attempting to delete setup file: "%SETUP_EXE%" del /F /Q "%SETUP_EXE%" 2>nul if exist "%SETUP_EXE%" ( echo Deletion failed - file remains. ) else ( echo Setup file deleted. ) ) exit /b %LASTEXIT% ) else ( echo Unknown parameter: %MODE% goto usage ) ) :usage echo Usage: %~nx0 --launch [args...] ^| --setup [args...] exit /b 1 ```
yindo changed title from [Feature Request] Configurable uninstall executable/command to [GH-ISSUE #140] [Feature Request] Configurable uninstall executable/command 2026-06-05 14:24:39 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Drop-OSS/drop-app#75