Remove Bloatware

Here is a script that I modified to remove bloatware from new HP machines and to setup a few simple items like network discovery. If someone can modify this to work as a procedure go for it. Currently it is NOT fully tested. I don’t have time to finish it up right now but I think it would be beneficial to the group it someone could work the bugs out:
:: ### START UAC SCRIPT ###

if “%2”==“firstrun” exit
cmd /c “%0” null firstrun

if “%1”==“skipuac” goto skipuacstart

:checkPrivileges
NET FILE 1>NUL 2>NUL
if ‘%errorlevel%’ == ‘0’ ( goto gotPrivileges ) else ( goto getPrivileges )

:getPrivileges
if ‘%1’==‘ELEV’ (shift & goto gotPrivileges)

setlocal DisableDelayedExpansion
set “batchPath=%~0”
setlocal EnableDelayedExpansion
ECHO Set UAC = CreateObject^(“Shell.Application”^) > “%temp%\OEgetPrivileges.vbs”
ECHO UAC.ShellExecute “!batchPath!”, “ELEV”, “”, “runas”, 1 >> “%temp%\OEgetPrivileges.vbs”
“%temp%\OEgetPrivileges.vbs”
exit /B

:gotPrivileges

setlocal & pushd .

cd /d %~dp0
cmd /c “%0” skipuac firstrun
cd /d %~dp0

:skipuacstart

if “%2”==“firstrun” exit

:: ### END UAC SCRIPT ###

:: ### START OF BATCH FILE BELOW

Echo “Ending Install” > c:\shared\sym.log
Echo “Setting Homepage” > c:\shared\sym.log
Const IE_START_PAGE = “HKCU\Software\Microsoft\Internet Explorer\Main\Start Page”
Set Shell = CreateObject(“WScript.shell”)
Shell.RegWrite IE_START_PAGE, “http://www.outlook.com”, “REG_SZ”
Echo “Enabling Network Discovery” > c:\shared\sym.log
netsh firewall set service type=fileandprint mode=enable profile=all
netsh advfirewall firewall set rule group=”network discovery” new enable=yes
Echo “Removing HP Bloatware” > c:\shared\sym.log
wmic product where name=“HP Device Access Manager” call uninstall /nointeractive
wmic product where name=“HP Drive Encryption” call uninstall /nointeractive
wmic product where name=“HP File Sanitizer” call uninstall /nointeractive
wmic product where name=“HP My Display” call uninstall /nointeractive
wmic product where name=“HP Setup” call uninstall /nointeractive
wmic product where name=“HP Softpaq Download Manager” call uninstall /nointeractive
wmic product where name=“HP Support Assistant” call uninstall /nointeractive
wmic product where name=“HP Theft Recovery” call uninstall /nointeractive
wmic product where name=“HP Documentation” call uninstall /nointeractive
wmic product where name=“HP Support Information” call uninstall /nointeractive
wmic product where name=“HP Client Security Manager” call uninstall /nointeractive