Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 599 Vote(s) - 3.51 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there Uninstall a program batch for windows?

#1
I have several programs I want to uninstall from my computer (Windows 7 64bit).

Is there a batch\script that can help me do it? or I need to do it one by one from Control Panel?

If there isn't for Windows 7, is there something like this in XP?

thanks,
Dor.
Reply

#2
to complement Bali's answer, try the following code...


@echo off
for /f "tokens=*" %%a in ('reg query hklm\software\Microsoft\Windows\CurrentVersion\Uninstall\ ^| find /I "%*"') do (
for /f "tokens=1,2,*" %%b in ('reg query "%%a" /v UninstallString ^| find /I "UninstallString"') do (
if /i %%b==UninstallString (
echo %%d
)
)
)

test it carefully. And then remove the `echo` command.
Reply

#3
There isn't really an `uninstall` command kind of thing in cmd that I know of. You could however query this reg key

`HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall`

(might also need to check `HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall` if you're on a 64-bit machine)

to find the program you want to uninstall. Each one will have an `UninstallString` value which will tell you the path to the programs uninstaller file which you can then execute by calling it's full path and filename.

If the uninstaller happens to be an msi you can use

`msiexec /uninstall /x` to silently uninstall it. This is about as much as you can do with batch I think.

Hope this helps!
Reply

#4
I wrote this this morning.



@Echo off
Echo This is a batch file uninstallation program.
Echo Run as administrator WMIC will not work.
echo.
Echo The command [wmic product get name] will run.
Echo Looking up all installed programs...
echo.
wmic product get name

echo 1. First program
echo 2. Second program
echo 3. Third program
echo 4. Fourth program
echo 5. Fifth program
echo.
@echo Pick a number:
echo.
choice /c:12345

if "%errorlevel%"=="1" wmic product where name="First program" call uninstall
if "%errorlevel%"=="2" wmic product where name="Second program" call uninstall
if "%errorlevel%"=="3" wmic product where name="Third program" call uninstall
if "%errorlevel%"=="4" wmic product where name="Fourth program" call uninstall
if "%errorlevel%"=="5" wmic product where name="Fifth program" call uninstall

Echo.
Echo.

@echo First method is done. I'll go into the alternate method.

pause
Echo Get user input - program name?
Echo.
Echo This is an alternate method
:input
set INPUT=
set /P INPUT=Uninstall which program?: %=%
if "%INPUT%"=="" goto input
echo Your input was: %INPUT%

echo.
echo.
Echo Uninstalling...

echo The command [wmic product where name="%INPUT%" call uninstall] will run.


wmic product where name="%INPUT%" call uninstall

@echo If there is "no instance" errors, then the program %INPUT% was uninstalled.

pause
Reply

#5
Use wmic right from the terminal. You can look at microsoft's documentation to see more usages.

This will be a great starting point:

wmic product where vendor="Autodesk" call uninstall
I use the above line to clean uninstall autodesk products.
Reply

#6
if you don't need it to be (command line) batch, then BCUninstaller is great to remove and cleanup many sotfwater at once in Windows :

[To see links please register here]

Reply

#7
(07-23-2023, 08:38 AM)sceptre162119 Wrote:

[To see links please register here]

I have several programs I want to uninstall from my computer (Windows 7 64bit).

Is there a batch\script that can help me do it? or I need to do it one by one from Control Panel?

If there isn't for Windows 7, is there something like this in XP?

thanks,
Dor.

There is no other way, you have to track what files you install to remove them with a uninstaller.
Protect yourself with Pure VPN -

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through