Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uninstall.bat potentially removes everything in Local AppData #13

Open
jhorsman opened this issue Nov 2, 2020 · 0 comments
Open

uninstall.bat potentially removes everything in Local AppData #13

jhorsman opened this issue Nov 2, 2020 · 0 comments

Comments

@jhorsman
Copy link

jhorsman commented Nov 2, 2020

I think the uninstall.bat script for Windows potentially can remove everything in the Local AppData.

The intent of the script is to figure out a path and store it in %id%.

IF "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
  FOR /f %%i in ('..\node\x64\node.exe -e "process.stdout.write(require('./config.js').id)"') do SET id=%%i
) ELSE (
  FOR /f %%i in ('..\node\x86\node.exe -e "process.stdout.write(require('./config.js').id)"') do SET id=%%i
)

However, if uninstall.bat is ran from outside the installation directory this might fail and %id% would be empty.
Therefore the following will attempt to delete everything in the Local AppData folder.

echo .. Deleting %id%
RMDIR /Q /S "%LocalAPPData%\%id%"
@jhorsman jhorsman changed the title uninstall.bat removes everything in Local AppData uninstall.bat potentially removes everything in Local AppData Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant