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 10, 2022
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"}
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"}
LainRobertson
Jun 10, 2022Silver 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