How to create a Online KScript to perform a custom upgrade of third-party plugin
说明
There are deployment scenario's, where it is not possible to update a third-party plugin with the use of Managed Installations. This article will explain how to perform a update of an plugin. The Online KScript will perform two separate tasks, one for uninstalling the old version and one for installing the newer version. This procedure can be used for all other similar update procedures, but this article will focus on Mimecast as an example.
解决办法
Perform the following steps, in order to create a Online KScript "Update Mimecast x64".
Go to Scripting | Scripts and select New from the Choose Action dropdown menu
Provide the necessary information in the Configure section:
Provide a relevant name for easy recognition (e.g. Update Mimecast x64)
Select the Enabled checkbox, to have this KScript active
Select Online KScript from the Type dropdown box
Select Production from the Status dropdown box
Optional: provide a short description in the Description field
Optional: provide some detailed information in the Notes field
Configure the Deploy section as follows:
Do not select the All Devices option. The focus of this script will be on a select group of machines.
Provide the relevant label in the Labels section.
Leave the Devices field blank.
Do not select the Select Specific Operating Systems checkbox
Select Microsoft Windows from the Operating System listbox.
Configure the Windows Run As section as follows:
Select Local System
Configure the Notify section as follows:
Select the Alert user before run checkbox
Select OK/Cancel from the Options dropdown menu
Change, if needed, the minutes described in the Timeout and Snooze Duration textboxes
Leave Cancel as default option in the Timeout Action dropdown menu
Optional: provide a relevant message in the Initial Message field
Configure the Schedule section as follows:
Leave the option None as default.
Do not select the Allow run without a logged-in user checkbox
Configure the Dependencies section as follows:
Select Add new dependency and browse to the new installation file to upload into the KACE Systems Management Appliance
In this procedure, the Mimecast_for_Outlook_5.2.1020.11990_(64_bit).msi installation package will be used.
Configure the Tasks section as follows:
Optional: provide a number in the Attempts text box
Recommended: change the On Failure option to Continue
In the Verify section, add a new step "Verify a process is running..." and enter outlook.exe in the Process name field
In the On Success section, add a new step "Kill a process..." and enter outlook.exe in the Name field
In the On Success section, add a new step "Launch a program"
In the Directory text box, enter the following: $(KACE_SYS_DIR)
In the File text box, enter the following: MsiExec.exe
Do not select the Wait for completion checkbox
In the Parameters text box, enter the following: /X {F08E1DC5-91C4-49F8-A696-B81031676CEA} /qn
Select New Task to create Task 2
Optional: provide a number in the Attempts text box
Recommended: change the On Failure option to Continue
In the Verify section, add a new step "Verify a process is not running..." and enter outlook.exe in the Process name field
In the On Success section, add a new step "Launch a program"
In the Directory text box, enter the following: $(KACE_SYS_DIR)
In the File text box, enter the following: MsiExec.exe
Do not select the Wait for completion checkbox
In the Parameters text box, enter the following: /i $(KACE_DEPENDENCY_DIR\Mimecast_for_Outlook_5.2.1020.11990_(64_bit).msi) /qn
In the On Success section, add a new step "Create a message window..." and provide the relevant information in the textboxes (select Save Changes when ready)
In the Remediation section, add a new step "Kill a process..." and enter outlook.exe in the Name field
In the On Remediation Success section, add a new step "Launch a program"
In the Directory text box, enter the following: $(KACE_SYS_DIR)
In the File text box, enter the following: MsiExec.exe
Do not select the Wait for completion checkbox
In the Parameters text box, enter the following: /i $(KACE_DEPENDENCY_DIR\Mimecast_for_Outlook_5.2.1020.11990_(64_bit).msi) /qn
In the On Remediation Success section, add a new step "Create a message window..." and provide the relevant information in the textboxes (select Save Changes when ready)
In the On Remediation Failure section, add a new step "Log message..."
Select status from the Type dropdown menu
Provide a relevant text in the Message field
Once done, click the Save Changes button to save the changes
If the selected managed machines are provided in step 3, then the KScript can be started by selecting the Run Now button. This option will also save the Online KScript, which will be announced with a information window. Otherwise, click on the Save button to save it for later usage.