/build/static/layout/Breadcrumb_cap_w.png
01/24/2019 239 views

Hello,


I am fairly new to KACE scripting and I am trying to use the scripts located @https://github.com/OfficeDev/Office-IT-Pro-Deployment-Scripts/tree/master/Office-ProPlus-Deployment/Remove-PreviousOfficeInstalls,

to remove all versions of office and reinstall the latest version. However my scripting is not giving me the desired results.  I am trying to upload a zipped file (Office365_Removal2) to c:\windows\temp, then from there I am tring to unzip that file which has multiple Office removal files and then run the powershell command to start the script to remove All-Office versions. I am uploading Unzipping from C:\Windows\Temp, because I haven't had results trying it from the $(KACE_DEPENENCY_DIR). Plus I haven't seen success trying to unzip the file from the $(KACE_DEPENDENCY_DIR) either.The files get downloaded to the (C:\ProgramData\Quest\KACE\kbots_cache\packages\kbots\177) directory but I haven't been able to work from there. Here is what I have so far. Looking for some assistance if possible if anyone has used these tools to remove Office in their environment. 











1 Comment   [ + ] Show comment

Comments

  • I used the OCT and configured my 2019 install to remove all old versions.

All Answers

0

The Upload action attempts to upload a file from the client to the server, which I don't think is what you want to do. I'm pretty sure you want to get the zip file to the client, and that is done using a dependency. What are the contents of the zip file? When it is downloaded to the script's directory on the client, does it get automatically unzipped? What do those files look like? Are they all at the root of the dependency folder, or are they in a sub folder?

If the files get unzipped directly to the scripts folder, launching this command should work:

Directory: c:\windows\system32

Program: cmd.exe

Arguments: /c powershell.exe -ExecutionPolicy bypass -file $(KACE_DEPENDENCY_VARIABLE)\Remove-PreviousOfficeInstalls.ps1

Remember that when using cmd.exe to run a command you need to use the /c parameter.

Answered 01/25/2019 by: chucksteel
Red Belt

  • This content is currently hidden from public view.
    Reason: Removed by member request For more information, visit our FAQ's.
This content is currently hidden from public view.
Reason: Removed by member request For more information, visit our FAQ's.
0

In answer to chucksteels questions, contents of the files

Here are the contents ofthe .zip file below. It is basically all the OffScrub files and the .power shellscripts. They end up in the kbots->Script# Directory and it is unzippedthere into a subfolder.

I debate about zippingthem in a file or just adding them as dependencies, because I think they willgo to the same place as shown. But after I get them there that’s when I am notable to get the correct parameters to get the scripts to remove the previousversions of Office or even the current version. 




Answered 02/12/2019 by: bowenz
White Belt

  • And what about the parameters you are using the launch the powershell script?
    • /c powershell.exe -ExecutionPolicy bypass -file $(KACE_DEPENDENCY_VARIABLE)\Office365_Removal\Remove-PreviousOfficeInstalls.ps1
      But that is not working.
      • The variable is $(KACE_DEPENDENCY_DIR), not what you have there.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share