Sure
// ---------------------------------------------EDITING INSTRUCTIONS---------------------------------------------------------------------
// When editing this task through the Manage Software Distribution Packages dashboard, you will have the option to preserve any custom edits you make to this action.
// If you select the option to preserve custom edits, only areas bound by the comment markers āPreparation Markerā, āCommand Markerā and āClosing Markerā are updated.
// To ensure that all your custom Action Script changes can be preserved, only make changes to areas that are not bound by the comment markers.
// Removing the comment markers may result in the Action Script not updating correctly during the next edit.
// See KB Article swg21668807 (http://www-01.ibm.com/support/docview.wss?uid=swg21668807) for more information.
// --------------------------------------------------------------------------------------------------------------------------------------
//**Begin Preparation Marker
// Download all specified files
begin prefetch block
add prefetch item name=E095B08CCFA3D9E9451650A3D0762D940394BCAA sha1=e095b08ccfa3d9e9451650a3d0762d940394bcaa size=165 url=SWDProtocol://127.0.0.1:52311/Uploads/E095B08CCFA3D9E9451650A3D0762D940394BCAA/background.bat.bfswd sha256=ddb11c6f31ba73a13e60f1aef232a4e63314758c6a4ca00e2b2e64c3f29ffa8e
add prefetch item name=052045A33E7F6A6998ADC8D216DFEFF8B920C114 sha1=052045a33e7f6a6998adc8d216dfeff8b920c114 size=179148 url=SWDProtocol://127.0.0.1:52311/Uploads/052045A33E7F6A6998ADC8D216DFEFF8B920C114/backgrounddefault.jpg.bfswd sha256=66b4b2f9b4e4c0a784a216925e93405b31b6a8c73cd08dbfb697e9dbd8f417c6
add prefetch item name=E32D952252D34FFFB704BDC2EA31150229C499E8 sha1=e32d952252d34fffb704bdc2ea31150229c499e8 size=6669684 url=SWDProtocol://127.0.0.1:52311/Uploads/E32D952252D34FFFB704BDC2EA31150229C499E8/TGCSThemePack.themepack.bfswd sha256=9f6b6a13eaf1f09a6ee887313e039f36ef782986ff3e73cd1cb7a3482541d6ff
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/E095B08CCFA3D9E9451650A3D0762D940394BCAAā "{parameter ābaseFolderā}background.bat"
move ā__Download/052045A33E7F6A6998ADC8D216DFEFF8B920C114ā "{parameter ābaseFolderā}backgrounddefault.jpg"
move ā__Download/E32D952252D34FFFB704BDC2EA31150229C499E8ā ā{parameter ābaseFolderā}TGCSThemePack.themepackā
// 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
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 %DATEANDTIME% >> "{parameter ālogFolderā}/{parameter ālogFileā}"
echo Action ID: {id of active action} >> "{parameter ālogFolderā}/{parameter ālogFileā}"
rem //**Begin Command Marker
echo Command: ābackground.batā >> "{parameter ālogFolderā}/{parameter ālogFileā}"
set errorlevel=
ābackground.batā >> ā{parameter ālogFolderā}/{parameter ālogFileā}ā 2>&1
set SWDExitCode=%errorlevel%
rem //**End Command Marker
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