

THIS WINDOW WILL CLOSE WHEN COMPLETE&prompt off My resolution was to use the following bat command: `start "-NOTICE-" cmd.exe /t:ec /Q /k "echo OFFICE 365 IS BEING INSTALLED. If neither of these options work you will have to check what $PSScriptRoot is being populated with and/or what the return of (Get-Item -Path ".\").FullName is as those are the two commands used to determine the location of the script that's being executed. That should also mean that the script is read from the file and the corresponding parameters are populated accordingly. The other option would be to run powershell -File with your current invocation of the script. As a bonus you wouldn't need to put the whole path in front of the script anymore. If %OS%=32BIT "\\domain\SYSVOL\domain\Policies\'\Machine\Scripts\Startup\ and the invocation of your script. Reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL & set OS=32BIT || set OS=64BIT Powershell.exe -executionpolicy bypass -NoExit -File "Remove-PreviousOfficeInstalls.ps1"

My full script is below: start "-NOTICE-" cmd.exe /t:ec /Q /k "echo OFFICE 365 IS BEING INSTALLED. Since using -File to work around my initial problem I've been unable to get the script to remove Office 2016 and would like some advice on how to do this, I've read that whatever command is after -File needs to be the last which I believe might be why it's failing. Please find my current script which now works for Office 2013, I previously added the line Remove2016Installs $true when using -Command to remove Office 2016, this worked. The Offscrub file is in the same location as the script, is someone able to tell me why it's looking in C:\Windows for it? Input Error: Can not find script file "C:\Windows\OffScrub_O15msi.vbs" I have the install working however, when I attempted to uninstall Office 2013 I received the following error: I'm currently trying to run a batch file as a startup script to detect and remove whatever version of office a user has installed and then to install Office 365.
