OfficeDev / Office-IT-Pro-Deployment-Scripts

A collection of useful PowerShell scripts to make deploying Office 2016 and Office 365 ProPlus easier for IT Pros and administrators. If you have any feature requests or ideas for future scripts please add the idea to the issues list in this repository
http://officedev.github.io/Office-IT-Pro-Deployment-Scripts
MIT License
887 stars 841 forks source link

Remove-PreviousOfficeInstalls.ps1 - legacy office removal issue #276

Open cptscooby opened 7 years ago

cptscooby commented 7 years ago

We are running the powershell script from a cmd file:

Powershell.exe %~dp0Remove_Office\Remove-PreviousOfficeInstalls.ps1 -Remove2016Installs $true -RemoveClickToRunVersions $True -Force $True -NoReboot $True -Quiet $True -LogFilePath C:\setup\Logs\Remove_Office.log

It removes Office 2016 and Office C2R fine without any issues. When it needs to remove an older version, my exampe is Office 2010, it detects the version fine but it tries to run the OffScrub10.vbs script from C:\Windows\ directory. We are deploying everything via a network script so nothing is local. Any reason why the legacy script would try to launch from the windows directory and not the path it is actually located unlike the 2016 or C2R scripts?

scoterland commented 6 years ago

no answer?

davegreen commented 5 years ago

This might be the same as the issue I ran into recently and fixed with #342. It's worth a try if you still need the fix and haven't worked around it. My issue was the script didn't quite work right with PowerShell v2 which the linked PR resolves.