For people looking into this in the future, I was able to get it working for Windows (Mac is looking to be a whole different animal).
Here’s our action script:
//**Begin Preparation Marker
// Download all specified files
begin prefetch block
add prefetch item name=412BE6EB7A100590DA8065B405101625298386C4 sha1=412be6eb7a100590da8065b405101625298386c4 size=805913546 url=SWDProtocol://127.0.0.1:52311/Uploads/412BE6EB7A100590DA8065B405101625298386C4/compressedPackageData-201903020939.bftemp.bfswd sha256=4de668188ac7f61c57c99feaa1f4d30b1e6eae29c82c80af3811dad720fc3e0b
end prefetch block
// All SWD files will go into a folder in the clients __BESData folder. This folder gets cleared on every restart.
parameter “baseFolder” = “__Download/”
// Move files into subfolders and unescape file names
move “__Download/412BE6EB7A100590DA8065B405101625298386C4” “__Download/compressedPackageData-201903020939.bftemp”
// extract any compressed files
extract “compressedPackageData-201903020939.bftemp”
// Log setup
parameter “mainSWDLogFolder” = "{parent folder of client folder of current site}/__Global/SWDDeployData"
folder create "{parameter “mainSWDLogFolder”}"
parameter “logFile” = “SWD_DeploymentResults.log”
//**End Preparation Marker
delete __createfile
if {name of operating system as lowercase starts with “win”}
parameter “logFolder” = “{parameter “mainSWDLogFolder”}”
// Run setup process
delete run.bat
// Use .bat to set working directory to packages root, for setup command.
createfile until end
@ECHO OFF
cd "{parameter “baseFolder”}"
rem // See comments at the beginning of this action for an explanation of the comment markers.
set DATESTAMP=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%
set DATEANDTIME=%DATESTAMP% %time%
echo %DATE% %TIME% >> "{parameter “logFolder”}{parameter “logFile”}"
echo Action ID: {id of active action} >> "{parameter “logFolder”}{parameter “logFile”}"
rem //**Begin Command Marker
echo Command: msiexec.exe /i “IBM Spectrum Protect Client.msi” RebootYesNo=“No” REBOOT=“Suppress” ALLUSERS=1 INSTALLDIR=“C:\Program Files\Tivoli\Tsm” ADDLOCAL=“BackupArchiveGUI,BackupArchiveWeb,Api64Runtime,AdministrativeCmd” TRANSFORMS=1033.mst /qn >> "{parameter “logFolder”}/{parameter “logFile”}"
set errorlevel=
msiexec.exe /i “IBM Spectrum Protect Client.msi” RebootYesNo=“No” REBOOT=“Suppress” ALLUSERS=1 INSTALLDIR=“C:\Program Files\Tivoli\Tsm” ADDLOCAL=“BackupArchiveGUI,BackupArchiveWeb,Api64Runtime,AdministrativeCmd” TRANSFORMS=1033.mst /qn >> “{parameter “logFolder”}/{parameter “logFile”}” 2>&1
echo Command: vcredist_x64.exe /q /norestart >> "{parameter “logFolder”}/{parameter “logFile”}"
vcredist_x64.exe /q /norestart >> “{parameter “logFolder”}/{parameter “logFile”}” 2>&1
echo Command: spinstall.exe /s /v"RebootYesNo=“No” Reboot=“ReallySuppress” ALLUSERS=1 /qn /lv “jre_log.txt”" >> "{parameter “logFolder”}{parameter “logFile”}"
set errorlevel=
spinstall.exe /s /v"RebootYesNo=“No” Reboot=“ReallySuppress” ALLUSERS=1 /qn /lv “jre_log.txt”" >> “{parameter “logFolder”}{parameter “logFile”}” 2>&1
set SWDExitCode=%errorlevel%
rem //**End Command Marker
@echo off
@echo %DATE%%TIME%: TSMCONFIG.BAT STARTED! >> “c:\program files\tivoli\tsm\baclient\config_log.txt”
@echo %DATE%%TIME%: Creating dsm.opt configuration file. >> “c:\program files\tivoli\tsm\baclient\config_log.txt”
@echo NODENAME EP-%COMPUTERNAME% > “c:\program files\tivoli\tsm\baclient\dsm.opt”
@echo TCPSERVERADDRESS servername >> “c:\program files\tivoli\tsm\baclient\dsm.opt”
@echo DOMAIN C: >> “c:\program files\tivoli\tsm\baclient\dsm.opt”
@echo EXCLUDE C:…*.* >> “c:\program files\tivoli\tsm\baclient\dsm.opt”
@echo INCLUDE C:\Users…*.* >> “c:\program files\tivoli\tsm\baclient\dsm.opt”
@echo PASSWORDACCESS GENERATE >> “c:\program files\tivoli\tsm\baclient\dsm.opt”
@echo %DATE%%TIME%: dsm.opt configuration file created. >> “c:\program files\tivoli\tsm\baclient\config_log.txt”
@echo %DATE%%TIME%: Attempting to authenticate to BF1 with dsmc. >> “c:\program files\tivoli\tsm\baclient\config_log.txt”
cd "c:\program files\tivoli\tsm\baclient"
dsmcutil remove /name:“TSM Scheduler Service” >> "c:\program files\tivoli\tsm\baclient\config_log.txt"
dsmcutil install scheduler /name:“TSM Scheduler Service” /node:EP-%COMPUTERNAME% /password:3u-73fnvxn /autostart:yes >> “c:\program files\tivoli\tsm\baclient\config_log.txt”
@echo %DATE%%TIME%: DONE. >> “c:\program files\tivoli\tsm\baclient\config_log.txt”
echo Return code: %SWDExitCode% >> "{parameter “logFolder”}/{parameter “logFile”}"
echo. >> "{parameter “logFolder”}/{parameter “logFile”}"
exit %SWDExitCode%
end
move __createfile run.bat
// You will not be able to stop or take action on an applicable BigFix Client until your installer completes.
// So ensure no user input is required.
// If your package absolutely must interact with the user, replace ‘override wait’ with ‘override run’ and ‘wait’ with ‘run’.
override wait
hidden=true
completion=job
wait run.bat
//**Begin Closing Marker
// Get the return code of the previous action.
parameter “returnCode” = “{exit code of action}”
// Task will now exit.
exit {parameter “returnCode”}
//**End Closing Marker