Forum Discussion
Removing Dell Preinstall software
Hi there,
I been removing the following Dell application from a laptop: with the following powershell comands, its not pretty but it works for me.
The first 3 commands work
Get-Package -Name "*Dell Command*" | Uninstall-Package
Get-Package -Name "*Dell Power Manager Service*" | Uninstall-Package
Get-Package -Name "*Dell Digital Delivery Services*" | Uninstall-Package
I had to use another script I found to remove: Dell SupportAssist Remediation this worked it move the different varations of support assist.
$SAVer = Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall |
Get-ItemProperty |
Where-Object {$_.DisplayName -match "SupportAssist" } |
Where-Object {$_.DisplayVersion -notlike "3.2*"} |
Select-Object -Property DisplayVersion, UninstallString, PSChildName
ForEach ($ver in $SAVer) {
If ($ver.UninstallString) {
$uninst = $ver.UninstallString
& cmd /c $uninst /quiet /norestart
}
}
I cannot remove Dell Optimizer
I have tried the following:
Get-Package -Name "*Dell Optimizer*" | Uninstall-Package nothing happens
Next I tried to remove from the registry. with the following PowerShell lines
$unins = Get-ChildItem "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall" -ErrorAction SilentlyContinue | Get-ItemProperty | Where-Object {$_.DisplayName -Like "*Dell Optimizer *"} | Select Displayname, Uninstallstring
I check to verify the uninstall string or path
I then run the following line Start-Process -FilePath $unins.UninstallString -ArgumentList "/S" -Wait and the the error message.
when i display the uninstall string i get this but in not sure what this mean or if its related
I new to powershell so I find scripts that work but i cannot find a command for this one app
DisplayName UninstallString
----------- ---------------
Dell Optimizer Service "C:\Program Files (x86)\InstallShield Installation Information\{286A9ADE-A581-43E8-AA85-6F5D58C7DC88}\DellOptimizer.exe" -remove -runfromtemp
any help of advise would be great whilst we wait for our imaging server i have to build 40 laptops many
- I think you have to split it into a path , "C:\Program Files (x86)\InstallShield Installation Information\{286A9ADE-A581-43E8-AA85-6F5D58C7DC88}\DellOptimizer.exe" in this case, and the argumentlist which is -remove -runfromtemp . It now wants to use "C:\Program Files (x86)\InstallShield Installation Information\{286A9ADE-A581-43E8-AA85-6F5D58C7DC88}\DellOptimizer.exe" -remove -runfromtemp as uninstallstring.
You could do a simple
if (test-path -path "C:\Program Files (x86)\InstallShield Installation Information\{286A9ADE-A581-43E8-AA85-6F5D58C7DC88}\DellOptimizer.exe" ) {invoke-command -scriptblock {'C:\Program Files (x86)\InstallShield Installation Information\{286A9ADE-A581-43E8-AA85-6F5D58C7DC88}\DellOptimizer.exe'} -ArgumentList "-remove -runfromtemp"}- LainRobertsonSilver Contributor
Splitting will work. You might also be able to "cheese" it through using Invoke-Expression.
For example:
Invoke-Expression -Command '& $($unins.UninstallString)';
Cheers,
Lain
- NAUK777Copper Contributorthanks but i not sure what you mean
- The uninstall string contains the path to the uninstall executable together with parameters, you try to run that together with a /s argumentlist...
My example script was for checking the existence of the software and then running the correct invoke-command with the uninstall executable and parameters in the argumentlist.
if (test-path -path "C:\Program Files (x86)\InstallShield Installation Information\{286A9ADE-A581-43E8-AA85-6F5D58C7DC88}\DellOptimizer.exe" ) {invoke-command -scriptblock {'C:\Program Files (x86)\InstallShield Installation Information\{286A9ADE-A581-43E8-AA85-6F5D58C7DC88}\DellOptimizer.exe'} -ArgumentList "-remove -runfromtemp"}