Forum Discussion
NAUK777
Jun 10, 2022Copper Contributor
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 "...
Jun 14, 2022
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"}
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"}
NAUK777
Jun 20, 2022Copper Contributor
I tried the script and first i got an error message i then removed the if from the beginning of the script and it just mirrored the scripts
- Jun 20, 2022
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'
}
Strange, the -argumentlist is a valid parameter for invoke-command?- NAUK777Jun 20, 2022Copper Contributor
I think I will just have to remove it manually but I do appreciate your help with this.
thanks
- Jun 20, 2022invoke-command -scriptblock {'C:\Program Files (x86)\InstallShield Installation Information\{286A9ADE-A581-43E8-AA85-6F5D58C7DC88}\DellOptimizer.exe'} -ArgumentList '-remove -runfromtemp'
}
You can always put this in the script that you use for other packages, if it's not there then you will receive an error but it should uninstall it when present