Forum Discussion
Removing Dell Preinstall software
Thank you Harm,
I just concious of the time you spending trying to help which is appreciated but I sure do not want to take advantage has time is import to us all. I will give the script a go but will also try it on other software like you mentioned.
regard Nick
try this
#detection
<#
Dell Optimizer Still Around
#>
try
{
$Folder = 'C:\Program Files\Dell\DellOptimizer\'
"Test to see if folder [$Folder] exists"
if (Test-Path -Path $Folder) {
"Path exists!"
Return $results.count
exit 1
} else {
"Path doesn't exist."
}
exit 0
}
catch{
$errMsg = $_.Exception.Message
Write-Error $errMsg
exit 1
}
#remediation
#Date and time
$dt = Get-Date -Format "dd-MM-yyyy-HH-mm-ss"
$logfile = "$env:temp\csi-delete-delloptimizer-$dt.log"
Start-Transcript -Path $logfile
#stop dell optimizer services
Get-Service -Name "DellOptimizer" | Stop-Service
#Get Dell Optimizer from registry
$uninstallstring = get-itemproperty 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*' | Where-Object { $_.DisplayName -match "optimizer service"}
#get the uninstall string for dell optimizer
$uninstallstring = $uninstallstring.UninstallString
#add the silent parameter and run throguh cmd to uninstall
cmd /c $uninstallstring -silent
Stop-Transcript
regards,
THiago Beier