I manage about 10,000 PC's via Microsoft InTune and I have found that around 500 of them have uTorrent installed and I need to remove it because of uTorrent's capabilities and security risk.
Basically what I am wanting to do is search the entire C:/ Drive for the "µTorrent.exe", Find it, Uninstall it, Delete any existence that it was ever there and keep looping through until all of the µTorrent related files are deleted. And Possibly remove any entry from the registry if possible.
I can run all of these commands in A CMD window just fine, so I am thinking it is a format error, so when trying to compile them all in batch it doesn't seem to complete after the:
.
Code: Select all
Call %p% /Uninstall /S /Q
Echo %p%
.
Then it fails.
.
BTW I can not use WMIC to uninstall the software because of where uTorrent installs itself.
.
I am going to post a little info I have found on the subject:
HKCU\Software\uTorrent
HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\µTorrent µTorrent /forceuninstall
Display Name: µTorrent
Version: 3.4.5.41628
Install Location:%APPDATA%\Roaming\uTorrent
Publisher: Bit Torrent Inc.
Uninstall String: "%APPDATA%\Roaming\uTorrent\uTorrent.exe" /UNINSTALL
Registry Location: Computer\HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\µTorrent
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\uTorrent
File location of uTorrent.exe C:\Users\Cricketadmin\AppData\Roaming\uTorrent
Remove for uTorrent client: Delete the exe: delete users\%Users\appdata\roaming\utorrent
C:/%USER%\AppData\Roaming\uTorrent\uTorrent.exe C:\Program Files\uTorrent\utorrent.exe
.
Dir /S C:*µTorrent.exe <--- will display any instance of µTorrent.exe on the entire c:/
.
Below I have posted what I have compiled so far:
.
Code: Select all
@echo OFF
CLS
TITLE Find and Uninstall µTorrent.exe
setlocal ENABLEDELAYEDEXPANSION
setlocal ENABLEEXTENSIONS
REM This Batch Program will Find and Uninstall µTorrent.exe
GoTo :LOOP1
:LOOP1
REM This loop will search all of the C:/ to find the "µTorrent.exe" file, and Uninstall "µTorrent.exe" if found.
For /R C:\ %%A IN (*) Do IF "%%~nxA"=="utorrent.exe" Set p=%%~dpnxA
IF DEFINED p (
Echo %p%
Call %p% /Uninstall /S /Q
Echo %p%
DEL /F /S /Q %p%
Echo %p%
GoTo :LOOP1
) Else (
Echo File not found & EXIT CMD
GoTo :LOOP2
)
:LOOP2
REM This loop will end the batch!
IF NOT EXIST %p% (
Echo %p% File not found & EXIT CMD
) ELSE (
Echo %p%
)
ENDLocal
EXIST /B
EXIT Errorlevel
END
REM I also need to be able to delete the desktop icon <- this is a reminder to me.
Dir /S C:\*ipscan24.exe