K1000 - easy way to deploy MSI and extract a config file
For a bunch of our Windows systems, I need setup a deployment to install a msi file, then extract a config file to C:\ProgramData\Folder and then run a powershell script to start the service.
Does anyone have any easy way to set this up? I'm running the latest K1000 10.2 SMA.
I tried doing it a few ways but haven't had any luck, don't using the Scripting module much for K1000.
There are a few ways:
1. obviously the Managed Install
zip (use a 3rd party tool to do so) the MSI, all additionally needed files like a msp, your powershell script and a short script which does all the steps (install, extract and run the powershell) and upload it to the MI. In the MI run only the self written script
2. use scripting module
scripting can be a bit tricky if the logic is not 100% clear
You just need one Task:
Verify (to check if something is true or false) you check if your software is installed (the binary is on its default location) or whatever you want from the dropdown from the logic: if this is true it starts the On Success else it goes to Remediation. I usually check "only" for "Directory exists" $(KACE_DEPENDENCY_DIR) since this is the default variable for the path where the agent puts all of the working files for this script. (all variables can be found if you click on the little blue mario block (the blue block with the question mark in it))
And then under On Success you add your steps:
- run a program to run msiexec
- copy a file to extract the config
- run a program to run your powershell; you should review this article regarding powershell scripting with the SMA: https://support.quest.com/kb/138389
all other tasks are not nessesary here but can still be filled if you want too do additional tasks
a detailed overview about the scripting module can be found here: https://support.quest.com/kace-systems-management-appliance/8.0.318/videos/25948
3. use task chains
you create distributions and scripts for each of your tasks because smaller tasks are always easier to create
then you add them in the right sequence into a task chain so they are ran together.