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

Remove C++ Build Tools and Python when tool is removed #68

Open
kimbaudi opened this Issue Aug 16, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@kimbaudi

kimbaudi commented Aug 16, 2017

I installed windows-build-tools using the following command:
npm install --global --production windows-build-tools

Now I want to uninstall it. So I entered the following command:
npm --vcc-build-tools-parameters='[""/Uninstall""]' install --global windows-build-tools

But I am unable to uninstall it. I get the following output:

C:\WINDOWS\system32>npm --vcc-build-tools-parameters='[""/Uninstall""]' install --global windows-build-tools

> windows-build-tools@1.3.2 postinstall C:\Users\pkim\AppData\Roaming\npm\node_modules\windows-build-tools
> node ./lib/index.js

Downloading BuildTools_Full.exe
Downloading python-2.7.13.msi
[>                                            ] 0.0% (0 B/s)
Downloaded python-2.7.13.msi. Saved to C:\Users\pkim\.windows-build-tools\python-2.7.13.msi.
Starting installation...
Launched installers, now waiting for them to finish.
This will likely take some time - please be patient!
Waiting for installers... -Successfully installed Python 2.7
Waiting for installers... -Successfully installed Visual Studio Build Tools.
+ windows-build-tools@1.3.2
added 128 packages in 72.392s

How can I uninstall windows-build-tools? Am I using /Uninstall parameter incorrectly?

I looked at #51 and it suggests uninstalling Microsoft Visual C++ Build Tools from Program & Features settings in Windows. If so, what is the use of /Uninstall parameter?

@ammonvictor

This comment has been minimized.

Show comment
Hide comment
@ammonvictor

ammonvictor Sep 13, 2017

What worked for me

  1. Navigating to where build tools downloaded the files (cd C:\Users\YOUR-USER-ACCOUNT\.windows-build-tools\) in a cmd with admin rights
  2. Ran "BuildTools_Full.exe /Uninstall /Force /S"
  3. Ran Python installer to uninstall

It's not the most elegant but it gets the job done. The alternative was to script in PowerShell which I know nothing about. See this repository ps1/launch-installer.ps1 where I adapted the script from

ammonvictor commented Sep 13, 2017

What worked for me

  1. Navigating to where build tools downloaded the files (cd C:\Users\YOUR-USER-ACCOUNT\.windows-build-tools\) in a cmd with admin rights
  2. Ran "BuildTools_Full.exe /Uninstall /Force /S"
  3. Ran Python installer to uninstall

It's not the most elegant but it gets the job done. The alternative was to script in PowerShell which I know nothing about. See this repository ps1/launch-installer.ps1 where I adapted the script from

@oliversalzburg

This comment has been minimized.

Show comment
Hide comment
@oliversalzburg

oliversalzburg Sep 25, 2017

Am I using /Uninstall parameter incorrectly?

Definitely not. Your command line is installing windows-build-tools via npm. You're just telling it to pass /Uninstall to the build tools while doing so.

You probably want to do what @ammonvictor suggested and npm uninstall the module itself.

oliversalzburg commented Sep 25, 2017

Am I using /Uninstall parameter incorrectly?

Definitely not. Your command line is installing windows-build-tools via npm. You're just telling it to pass /Uninstall to the build tools while doing so.

You probably want to do what @ammonvictor suggested and npm uninstall the module itself.

@felixrieseberg felixrieseberg changed the title from Unable to uninstall windows-build-tools using /Uninstall parameter to Remove C++ Build Tools and Python when tool is removed Feb 3, 2018

@felixrieseberg

This comment has been minimized.

Show comment
Hide comment
@felixrieseberg

felixrieseberg Feb 3, 2018

Owner

We sadly don't remove the Visual Studio C++ Build tools or Python when you uninstall. I've updated the title of he issue.

I'm frankly a bit afraid of breaking too many user's environments when we auto-remove anything from the system, but npm's hooks would allow us to run code and therefore remove the C++ Build Tools and/or Python programmatically.

I'd love to see a PR!

Owner

felixrieseberg commented Feb 3, 2018

We sadly don't remove the Visual Studio C++ Build tools or Python when you uninstall. I've updated the title of he issue.

I'm frankly a bit afraid of breaking too many user's environments when we auto-remove anything from the system, but npm's hooks would allow us to run code and therefore remove the C++ Build Tools and/or Python programmatically.

I'd love to see a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment