Hallo Everyone,


it seems that I got a really big client-installation-requirement and -task for the Kace K2000 appliance. I didnt find a solution with google for my specific task. Maybe someone’s got some tips and ideas. Sorry for my very basic english.



We are using clients with two windows-partitions because of software-requirements. Partition 1 is a windows-7-x86-partition and partition 2 is a windows-7-x64-partition. The clients have the windows-boot-menue to choose which partition should be booted. Both partitions are specific pre-configured-images with sysprep.



The task is not really simple. We want use the K2000 appliance to install a client with the two in the overview described windows-partitions, configure the boot-menue and do post-installation-tasks for each partition. That’s where the problem starts. We want to do automated post-installation-tasks on both partitions. 


What we got working:

We captured both partitions with sysprep at the same time from a masterclient with the k2000-KBE. Deploying this image is working fine. K2000 has successfully deployed both partitions. Also we got a post-installation-task working to edit the boot-menue-sequence and do a reboot to start from partition 2, normally it would start from partition 1. Here is where the problem really starts.


After booting from partition 2 we want to continue the post-installation-tasks from the k2000 but it doesnt work, ofcourse. So we are looking for a solution to move the post-installation tasks from partition 1 to partition 2 and continue the final-tasks. 

Maybe there is a windows-directory on partition 1 from the k2000-deployment which could be moved to partition 2 or some other solutions.


I really hope for some tips and ideas, maybe a solution.


Thank you.

Answer Summary:
0 Comments   [ + ] Show Comments


Please log in to comment

Answer Chosen by the Author

You will need to copy the HKLM\Software\microsoft\windows\currentversion\run\kace key from c: to d:

Kace sets triggers to start the post from local drive and sequence the other post tasks.  If you copy the tasks prior to triggering them (first task) you will have trigger system intact so it will be the same point on both drives.  If you check restart after the first task, both should start at the next post task. 

the xml 371 starting at the local calls


Answered 05/13/2016 by: SMal.tmcc
Red Belt

  • edited with the key needed to run the trigger system
  • that it setup via one of the vb scripts they call mid level
  • you will want to go open the two vbs files they use to set the triggers to local


    you can find the path to them in the mid level area of the xml, see first answer
Please log in to comment


Interesting concept!

So here is the loaded gun, have fun experimenting with it.

If this is gonna work this is what you most likely will need to do.  If you get really creative you can extend the current kace engine to the other partition and inject yourself a different set of post calls for the kace engine to run instead of just copying.  That is what I would look at doing ultimately.

The Kace post tasks are put into c:\kace and deleted in the final task.  To start I would copy that structure from C: to D: and see what happens.  The biggest problem I see with this is the OS type changes, no idea how it will handle that. 

Installing programs post could be accomplished by calling a bat that checks the OS and either use the x86 or x64 installer. 

If you have any good VBS knowledge you can dissect the VB scripts that do the post setup and create some of your own to run as the first post task and create a second post setup.  Use a dummy image with the x64 post tasks and fool the vb script to exam that image xml settings instead of the current images xml settings.

connect to your K2 from your tech station  (ex  \\ikbox)
use admin for the user and your samba share password.

Change the \\ikbox to be \\ikbox\peinst and you will see where all the goodies are put.
the scripts dir contain the xml and conf files for the images, the applications dir are the tasks by number you will find listed in the xml file for that image.

as an example.  point your mouse at an image you will see its id in the bottom corner
in scripts you will find files with this number

opening the task xml looks like this

you can then go to applications\## and see the files used in the task
we will look at id 24 since its commandline is copy_post_install_files.vbs

the vbs file contains this code
Option Explicit

Dim xmlDoc
Dim envVarFile
Dim configFile
Dim varList, varNode
Dim name
Dim value
Dim usbNode, usbValue, usbDeployment
Dim objShell, objFSO, objTextFile
Dim command
Dim strErrorCode
Dim dictionary
Dim tasksFile, taskList, taskNode, taskType, taskId
Dim postTaskDir, currentPostTaskDir, utility_dir, check_img_vbs_dir, dest_dir, notepad_dir

' Environment variables file will be in the same place each time.
envVarFile = "X:\KACE\Engine\EnvVars.xml"

Set xmlDoc = CreateObject("Msxml2.DOMDocument")


Set varList = xmlDoc.SelectNodes("//BootAction/EnvironmentVariables/EnvironmentVariable")

Set dictionary = CreateObject("Scripting.Dictionary")

For Each varNode in varList

name = varNode.SelectSingleNode("Name").Text

value = varNode.SelectSingleNode("Value").Text

dictionary.add name, value


' Config file will be in the same place each time.
configFile = "X:\KACE\Engine\Config.xml"


Set usbNode = xmlDoc.SelectSingleNode("//Config/USBDeployment")

usbValue = usbNode.Text

If UCase(usbValue) = "TRUE" Then
usbDeployment = True
usbDeployment = False
End If

Set objShell = CreateObject("WScript.Shell")

If usbDeployment Then
postTaskDir = objShell.ExpandEnvironmentStrings("%UFDPATH%\KACE\applications")
utility_dir = objShell.ExpandEnvironmentStrings("%UFDPATH%\KACE")
check_img_vbs_dir = objShell.ExpandEnvironmentStrings("%UFDPATH%\KACE")
notepad_dir = objShell.ExpandEnvironmentStrings("%UFDPATH%\KACE\bin")
postTaskDir = "Y:\applications"
utility_dir = objShell.ExpandEnvironmentStrings("Y:\hta\%PROCESSOR_ARCHITECTURE%")
check_img_vbs_dir = "Y:\hta"
notepad_dir = objShell.ExpandEnvironmentStrings("Y:\hta\%PROCESSOR_ARCHITECTURE%")
End If

Set objFSO = CreateObject("Scripting.FileSystemObject")

command = "cmd /c md " & dictionary.Item("IMG_SYSTEM_DRIVE") & "\KACE"

strErrorCode = objShell.Run(command, 0, True)

command = "cmd /c md " & dictionary.Item("IMG_SYSTEM_DRIVE") & "\KACE\bin"

strErrorCode = objShell.Run(command, 0, True)

command = "cmd /c md " & dictionary.Item("IMG_SYSTEM_DRIVE") & "\KACE\Applications"

strErrorCode = objShell.Run(command, 0, True)

command = "cmd /c copy /Y " & check_img_vbs_dir & "\check_image.vbs " & dictionary.Item("IMG_SYSTEM_DRIVE") & "\KACE\bin"

strErrorCode = objShell.Run(command, 0, True)

command = "cmd /c copy /Y " & notepad_dir & "\kgetfilename.exe " & dictionary.Item("IMG_SYSTEM_DRIVE") & "\KACE\bin"

strErrorCode = objShell.Run(command, 0, True)

command = "cmd /c copy /Y " & utility_dir & "\kcleanup.exe " & dictionary.Item("IMG_SYSTEM_DRIVE") & "\"

strErrorCode = objShell.Run(command, 0, True)

' Tasks file will be in the same place each time.
tasksFile = "X:\KACE\Engine\Tasks.xml"


Set taskList = xmlDoc.SelectNodes("//Tasks/Task")

For Each taskNode in taskList

taskType = taskNode.SelectSingleNode("Type").Text

If taskType = "PO" Then

taskId = taskNode.Attributes.getNamedItem("ID").Text

dest_dir = dictionary.Item("IMG_SYSTEM_DRIVE") & "\KACE\Applications\" & taskId

command = "cmd /c md " & dest_dir
strErrorCode = objShell.Run(command, 0, True)

currentPostTaskDir = postTaskDir & "\" & taskId

If objFSO.FolderExists(currentPostTaskDir & "\contents\") Then
currentPostTaskDir = currentPostTaskDir & "\contents"
End If

command = "cmd /c xcopy /y /f /s /h /e " & currentPostTaskDir & "\* " & dest_dir

strErrorCode = objShell.Run(command, 0, True)
End If

Set dictionary = Nothing
Set xmlDoc = Nothing
Set objShell = Nothing
Set objFSO = Nothing

Happy Hunting! stay in touch.
Answered 05/13/2016 by: SMal.tmcc
Red Belt

  • That was an AWESOME tutorial. It really helped to get my feet under me as I'm learning this KACE stuff. Thanks muchly!
Please log in to comment
@smal-tmcc Thank you very much for your reply. You made a lot of good tips. I learned very much and I will definitly use it.
First I would go for the copy-methode you talked about to just get it started correctly. 

After I copied the post tasks to D:\Kace and boot partition 2, I think there has to be some kind of trigger to start the Kace Engine and actually run the tasks in partition 2. So I have to copy some kind of script or executeable file in the autostart-folder of partition 2 right?

I configured the sysprep with an automated login of the local administrator. Because of that, there is potential for an zero-touch installation.

How can I start the Kace Engine in partition 2 to continue the copied post tasks? Is there a exe-file or script I can build or put there to trigger or continue the post tasks?

Answered 05/13/2016 by: Kevin.Dreher
White Belt

Please log in to comment
Answer this question or Comment on this question for clarity