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
#Create Model Variable
$ComputerModel = Get-WmiObject -Class Win32_computersystem | Select-Object -ExpandProperty Model
#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
#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"
$Process = start-process Flash64W.exe -ArgumentList $cmds -PassThru -wait 2>$Null
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.
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
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