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
882 stars 838 forks source link

Remove-PreviousOfficeInstalls issue #338

Open Admaine opened 5 years ago

Admaine commented 5 years ago

Hi Everyone,

I hope you can help.

I'm in the process of setting up a script via GPO to detect what version of office is installed and remove (using the Remove-PreviousOfficeInstalls.ps1 file) and then install Office 365. The install part of this is working perfectly however, I now have an issue whereby after it detects the version of office and attempts to uninstall it provides the error

Input Error: Can not find script file "C:\Windows\OffScrub_O15msi.vbs".

The Offscrub files required are in the same location as the script so I'm not entirely sure why it's looking for it in C:\Windows

Is anyone able to help please?

Thanks in advance.

davegreen commented 5 years ago

Are you running this on Windows 7 (PowerShell v2) by any chance?

I had similar issues, which is fixed with a small edit in the following PR #342.