Got a Problem with Custom Deployments and Tasks.xml -my Applications don`'t find their Payload.

Background is we want to change the BIOS from Legacy to UEFI and also do a BIOS update prior to OS deployment.

I created a custom KBE where I basically used the existing KBE and Infused with DISM the CCTK-Tool.  then I created a script (Ps1) to update my clients BIOS with a Custom Deployment.

While the switch from Legacy to UEFI works like a charm -I've encountered a really nasty roadblock.

Then I created an Application called "BIOS-Update" to "distribute" my BIOS update. Basically I zipped the BIOS Update Folders and my Powershell-Script and my  CallBios-Updates.bat into a single Zip-File.

The PowerShell-Script gets called by execute.bat

"powershell.exe -nologo -executionpolicy bypass -file DellBiosUpgradePackage-6.0.ps1"

The Powershell-Script works like this

#Get Create Target folder

    #"C:\ProgramData\Quest\KACE\kbots_cache\packages\kbots\228" is the folder if i use the SMA-Script and "y:\applications\244\" is the SDA Path

new-item -Path C:\ProgramData\Quest\KACE\kbots_cache\packages\kbots\228 -ItemType directory

Expand-Archive -Path y:\applications\244\NZZ_BIOS_Update.Zip -DestinationPath C:\ProgramData\Quest\KACE\kbots_cache\packages\kbots\228

#Get Bios Password from File

$BiosPassword = Get-Content C:\ProgramData\Quest\KACE\kbots_cache\packages\kbots\228\Bios.txt

write-host $BiosPassword

#Create Model Variable

$ComputerModel = Get-WmiObject -Class Win32_computersystem | Select-Object -ExpandProperty Model

write-host $ComputerModel

#Get Bios File Name (Uses the Bios EXE file in the same folder)

$BiosFileName = Get-ChildItem C:\ProgramData\Quest\KACE\kbots_cache\packages\kbots\228\$ComputerModel\*.exe -Verbose | Select -ExpandProperty Name

write-host $BiosFileName

#Copy Bios Installer and flashtool to x:\ - the Flash64W didn't like when I left it in the Computer Model folder 

New-Item -Path C:\ProgramData\NZZ\BIOS-Update\$ComputerModel -ItemType Directory

Copy-Item C:\ProgramData\Quest\KACE\kbots_cache\packages\kbots\228\$ComputerModel\$BiosFileName -Destination C:\ProgramData\NZZ\BIOS-Update\$ComputerModel

Copy-Item C:\ProgramData\Quest\KACE\kbots_cache\packages\kbots\228\Flash64W.exe -Destination C:\ProgramData\NZZ\BIOS-Update\$ComputerModel

#Set Command Arguments for Bios Update

$cmds = "/b=$BiosFileName /s /p=$BiosPassword"

write-host $cmds

#Update Bios

Push-location C:\ProgramData\NZZ\BIOS-Update\$ComputerModel

$Process = start-process Flash64W.exe  -ArgumentList $cmds -PassThru -wait 2>$Null

When I start the Postinstall-Part of my Custom Deployment this doesn't work the error message is  "execute.bat" could not be found...

After Checking the petemp-share everything was in place and syncronised accros the SDA and RSA's properly . I could start my PS1 from Kace-Recovery console without any problems and the BIOS update(s) ran smooth.

Next Step was checking the Tasks.xml and here I "discovered" the "error" the Path is "%systemdrive%\Kace\applications\..." this is for a "normal Post-Install Task perfectly OK as it would be copied to a local drive -normally c:\- before beeing executed.  For a Custom Deployment where the folders on the Local Systemdrive will not be created this doesn't work -right.

So the obvious workaround of course is to integrate the  Application in the OS-Deployment. That's what i decided to do. I created a k-script and used the sources above (minus the "#Get Create Target folder" -part)

I called the K-Script with a vbs -script like the one provided by Timo Weberskirch https://www.itninja.com/blog/view/k2000-install-default-software-from-k1000-during-deployment-1 (Kudos here) and it works perfect -but is not what I'm really after. 

There has to be a way to use post-Install Tasks in a Custom deployments but I can't figure out how...-any advice will be highly appreciated.

3 Comments   [ + ] Show comments
  • build a custom KBE with Powershell and CTTK tools embedded (with KBE manipulator).

    Then use powershell commands to summon and use CCTK. - Channeler 1 year ago
  • Hi Channeler, thanks for your support. That is what I did beforehand. The Pre-Installation Task is no Problem worked like a charm -even the Mid-Level Task to change the bootorder to uefi -Hdd and activating the Secure boot worked perfect. The Issue I had was the Post-Install-Task -which i solved by calling the Bios update from K1000.. - SporrerS1977 1 year ago
    • When you are in post tasks, the KBE is no more.

      Post install tasks are executed from the Windows OS, so if the Windows OS doesn't have CCTK installed, your tasks will fail.

      Yes, using the KACE SMA is also an option for finishing tasks.

      1- You could have created a Post task to install CCTK...

      2- Then you run your commands with more tasks

      3- and finally, a post install task to remove CCTK from the OS. - Channeler 1 year ago
      • you are in left field, he is talking custom deployment so the only way post will run is you manually inject the Kace tasks that set it up for post to run.

        see answer below - SMal.tmcc 1 year ago
  • I think it would have been a good idea to include the cctk rather in the Image then having the fuss to create a customized KBE. But we wanted to have a single go -100% automated- where we take the legacy BIOS based Windows 7 Clients and a) switch them to UEFI, b) update the BIOS to the most current version and C) Install windows 10 (including Bitlocker Preprovisioned and Secure Boot activated)
    At the moment we have an average deployment time of 2 hours (including up to 15 Software packages).. In Contrast to the usual less complicated deployments where we have an average time of 45 up to 60 minutes... - SporrerS1977 1 year ago

Answers (3)

Answer Summary:
Posted by: SMal.tmcc 1 year ago
Red Belt

Top Answer

BTW to get any post install task to work in custom mode you need to critical Kace tasks mid and post.  I do total deployments thru custom.

you need to modify this files line If UCase(imageValue) =  from wim to custom_deployment

Posted by: SMal.tmcc 1 year ago
Red Belt

The best way to do what you want is build a special kbe and do not bother with any deployments

Create that custom kbe, build those files into it.  Name the KBE "bios updater"

Make a directory on your desktop and put all the file you need to run (bat, ps1, bios files) in it.

Open the KBEM and go to the configure - modify kbe tools page and use the add files to kbe, choose that directory.

Then go to configure - add custom dos commands to do what you want.  make all path references to x:\applications

make your last line

Wpeutil Shutdown

Posted by: SMal.tmcc 1 year ago
Red Belt

To run the cctk post without installing it you can create a portable cctk and use an App task to run it.

This is for x64

On a machine with the C|C installed

Create a temp directory on the desktop

copy the files from C:\Program Files (x86)\Dell\Command Configure\X86_64 and C:\Program Files (x86)\Dell\Command Configure\X86_64\HAPI to that directory

Zip all files in the temp directory

create app tasks and attach zip to it.

for command call cctk.exe /switches

This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ