Hi all,
I would like to concatenate string with parameters and concatenate action script parameter with powershell file.
for example an action script I wrote and would like to make concatenation of the parameter named “contentInstallation” with any other string and with a powershell script content on my clients:
// Declare parameters and delete old files
parameter "contentInstallation" = "dotNET"
parameter "logFile" = "C:\windows\temp\BigFix_deploy\Logs\InstallLogFile.txt"
parameter "PSFile" = "C:\windows\temp\BigFix_deployScripts\"&{parameter "contentInstallation"}"&"Install.ps1"
// delete {parameter "logFile"}
// delete {parameter "PSFile"}
// Create folders if not exists
dos if not exist "C:\windows\temp\BigFix_deploy" md "C:\windows\temp\BigFix_deploy" // Creates Bigfix folder if not exists for installation files
dos if not exist "C:\windows\temp\BigFix_deploy\Logs" md "C:\windows\temp\BigFix_deploy\Logs" // Creates logs folder for installation logging
dos if not exist "C:\windows\temp\BigFix_deploy\Scripts" md "C:\windows\temp\BigFix_deploy\Scripts" // Creates scripts folder for storing installation scripts
dos if not exist "C:\windows\temp\BigFix_deploy\Installs" md "C:\windows\temp\BigFix_deploy\Installs" // Creates Installs folder for storing installation reuqests files
createfile until _END_
$error.clear()
set-executionpolicy -executionpolicy unrestricted -Force
new-item -itemtype file -path C:\windows\temp\BigFix_deploy\&{parameter "contentInstallation"}&found.InstallSuccess
if($error)
{
$error | out-file {parameter "logFile"}
}
_END_
move __createfile {parameter "PSFile"}
runhidden powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File {parameter "PSFile"}
thank you all