Please help verify below script to assist resolve this issue
Action
Script Type BigFix Action Script
begin prefetch block
//Input Parameters: Windows image identifiers
action parameter query “qImage” with description "Enter the image name: " with default ""
action parameter query “qImageSize” with description "Enter the image size: " with default ""
parameter “imageSize” = "{(parameter “qImageSize”) as string}"
action parameter query “qImageURL” with description "Enter the image URL: " with default ""
parameter “imageURL” = "{(parameter “qImageURL”) as string}"
action parameter query “qImageSHA1” with description "Enter the image SHA1: " with default ""
parameter “imageSHA1” = "{(parameter “qImageSHA1”) as string}"
action parameter query “qImageSHA256” with description "Enter the image SHA256: " with default ""
parameter “imageSHA256” = “{(parameter “qImageSHA256”) as string}”
action parameter query “qImageArch” with description "Enter the image architecture (x86 or x64): " with default ""
parameter “imageArch” = "{(parameter “qImageArch”) as string}"
action parameter query “qOSResource” with description "Enter the OS resource Name: " with default ""
parameter “OSResource” = "{(parameter “qOSResource”) as string}"
action parameter query “qOSResourceURL” with description "Enter the OS resource URL: " with default ""
parameter “OSResourceURL” = "{(parameter “qOSResourceURL”) as string}"
action parameter query “qOSResourceSize” with description "Enter the OS resource size: " with default ""
parameter “OSResourceSize” = "{(parameter “qOSResourceSize”) as string}"
action parameter query “qOSResourceSHA1” with description "Enter the OS resource SHA1: " with default ""
parameter “OSResourceSHA1” = "{(parameter “qOSResourceSHA1”) as string}"
action parameter query “qOSResourceSHA256” with description "Enter the OS resource SHA256: " with default ""
parameter “OSResourceSHA256” = "{(parameter “qOSResourceSHA256”) as string}"
action parameter query “qFlag” with description "Enter the OS flag: " with default ""
parameter “flag” = "{(parameter “qFlag”) as string}"
action parameter query “qLanguage” with description "Enter the OS language: " with default ""
parameter “imageLanguage” = "{(parameter “qLanguage”) as string}"
action parameter query “qProductKey” with description "Enter the Product Key: " with default ""
parameter “productKey” = "{(parameter “qProductKey”) as string}"
action parameter query “qVersion” with description "Enter the OS version: " with default ""
parameter “imageVersion” = “{(parameter “qVersion”) as string}”
add prefetch item name=unzip-6.0.exe sha1=84debf12767785cd9b43811022407de7413beb6f size=204800 url=http://software.bigfix.com/download/redist/unzip-6.0.exe sha256=2122557d350fd1c59fb0ef32125330bde673e9331eb9371b454c2ad2d82091ac
add prefetch item name=install.wim sha1={parameter “imageSHA1”} size={parameter “imageSize”} url={parameter “imageURL”} sha256={parameter “imageSHA256”}
add prefetch item name=mdtOSInfoObj.zip sha1={parameter “OSResourceSHA1”} size={parameter “OSResourceSize”} url={parameter “OSResourceURL”} sha256={parameter “OSResourceSHA256”}
collect prefetch items
end prefetch block
regset “[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\ImageInfo]” “UpgradeStatus”=“Running”
// Check architecture match
if {architecture of operating system is “x86_64”}
continue if {parameter “imageArch” is “x64”}
else
continue if {parameter “imageArch” is “x86”}
endif
parameter “deployPath” = "{(value of variable “SystemDrive” of environment) & “\in_place_upgrade”}"
waithidden cmd /C rmdir /S /Q "{parameter “deployPath”}"
continue if {not exists folder (parameter “deployPath”)}
if {not exists folder (parameter “deployPath”)}
wait cmd /C mkdir "{(parameter “deployPath”)}"
endif
continue if {exists folder (parameter “deployPath”)}
// Extract OS resource
parameter “srcMDTOS” = "__download\mdtOSInfoObj.zip"
parameter “dstPath” = "{(parameter “deployPath”) & “\W10” & (parameter “imageArch”)}"
waithidden cmd.exe /C __Download\unzip-6.0.exe -o “{parameter “srcMDTOS”}” -d “{parameter “dstPath”}” > __download\resourceUnzip.log
runhidden cmd.exe /C del “{parameter “srcMDTOS”}”
// Check that the resource folder has been setup
parameter “dstFolderPath” = "{(parameter “dstPath”) & “\sources”}"
continue if {exists folder (parameter “dstFolderPath”)}
// Prepare the wim file
parameter “wimImageName” = "{parameter “qImage”}"
parameter “dstWimPath” = "{parameter “dstFolderPath” & “\install.wim”}"
move “__Download\install.wim” “{parameter “dstWimPath”}”
if {x64 of operating system}
createfile until __EOF
reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\BigFix\EnterpriseClient\ImageInfo” /v UpgradeStatus /t REG_SZ /d “UpgradeSuccess” /f
rmdir /S /Q "{parameter “deployPath”}"
shutdown /r /t 0
__EOF
else
createfile until __EOF
reg add “HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\ImageInfo” /v UpgradeStatus /t REG_SZ /d “UpgradeSuccess” /f
rmdir /S /Q "{parameter “deployPath”}"
shutdown /r /t 0
__EOF
endif
move __createfile “{(parameter “dstPath”) & “\setupcomplete.cmd”}”
if {x64 of operating system}
createfile until __EOF
reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\BigFix\EnterpriseClient\ImageInfo” /v UpgradeStatus /t REG_SZ /d “UpgradeFailure” /f
__EOF
else
createfile until __EOF
reg add “HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\ImageInfo” /v UpgradeStatus /t REG_SZ /d “UpgradeFailure” /f
__EOF
endif
move __createfile “{(parameter “dstPath”) & “\setupRollback.cmd”}”
// Create the upgradeCheckAttended script that performs a system check (no upgrade) using the graphical interface
if {(parameter “ignoreWarnings”) is “Yes”}
parameter “allExtraOptions” = "/Compat IgnoreWarning {(parameter “moreOptions”)}"
else
parameter “allExtraOptions” = "{(parameter “moreOptions”)}"
endif
if {(parameter “productKey”) is “”}
createfile until __EOF
start /Wait {parameter “dstPath”}\setup.exe /auto Upgrade /Compat ScanOnly /NoReboot {(parameter “allExtraOptions”)} /DynamicUpdate Disable
echo %errorlevel% > “{parameter “dstPath”}\out.log”
__EOF
else
createfile until __EOF
start /Wait {parameter “dstPath”}\setup.exe /auto Upgrade /Compat ScanOnly /NoReboot {(parameter “allExtraOptions”)} /DynamicUpdate Disable /pkey {parameter “productKey”}
echo %errorlevel% > “{parameter “dstPath”}\out.log”
__EOF
endif
move __createFile “{(parameter “dstPath”) & “/upgradeCheckAttended.bat”}”
// Create the upgradeCheckSilent script that performs a system check (no upgrade) in silent mode
if {(parameter “productKey”) is “”}
createfile until __EOF
start /Wait {parameter “dstPath”}\setup.exe /auto Upgrade /Quiet /Compat ScanOnly /NoReboot {(parameter “allExtraOptions”)} /DynamicUpdate Disable
echo %errorlevel% > “{parameter “dstPath”}\out.log”
__EOF
else
createfile until __EOF
start /Wait {parameter “dstPath”}\setup.exe /auto Upgrade /Quiet /Compat ScanOnly /NoReboot {(parameter “allExtraOptions”)} /DynamicUpdate Disable /pkey {parameter “productKey”}
echo %errorlevel% > “{parameter “dstPath”}\out.log”
__EOF
endif
move __createFile “{(parameter “dstPath”) & “/upgradeCheckSilent.bat”}”
// Create the upgradeSilent script that performs a system upgrade in silent mode
if {(parameter “productKey”) is “”}
createfile until __EOF
start /Wait {parameter “dstPath”}\setup.exe /auto Upgrade /Quiet /NoReboot {(parameter “allExtraOptions”)} /DynamicUpdate Disable /PostOobe {parameter “dstPath”}\setupcomplete.cmd /PostRollback {parameter “dstPath”}\setupRollback.cmd
echo %errorlevel% > “{parameter “dstPath”}\out.log”
__EOF
else
createfile until __EOF
start /Wait {parameter “dstPath”}\setup.exe /auto Upgrade /Quiet /NoReboot {(parameter “allExtraOptions”)} /DynamicUpdate Disable /PostOobe {parameter “dstPath”}\setupcomplete.cmd /PostRollback {parameter “dstPath”}\setupRollback.cmd /pkey {parameter “productKey”}
echo %errorlevel% > “{parameter “dstPath”}\out.log”
__EOF
endif
move __createFile “{(parameter “dstPath”) & “/upgradeSilent.bat”}”
// Create the upgradeAttended script that performs a system upgrade using the graphical interface
if {(parameter “productKey”) is “”}
createfile until __EOF
start /Wait {parameter “dstPath”}\setup.exe /auto Upgrade {(parameter “allExtraOptions”)} /DynamicUpdate Disable /PostOobe {parameter “dstPath”}\setupcomplete.cmd /PostRollback {parameter “dstPath”}\setupRollback.cmd
echo %errorlevel% > “{parameter “dstPath”}\out.log”
__EOF
else
createfile until __EOF
start /Wait {parameter “dstPath”}\setup.exe /auto Upgrade {(parameter “allExtraOptions”)} /DynamicUpdate Disable /PostOobe {parameter “dstPath”}\setupcomplete.cmd /PostRollback {parameter “dstPath”}\setupRollback.cmd /pkey {parameter “productKey”}
echo %errorlevel% > “{parameter “dstPath”}\out.log”
__EOF
endif
move __createFile “{(parameter “dstPath”) & “/upgradeAttended.bat”}”
//in case of build upgrade in Win 10, avoid to install older build
if {name of operating system is “Win10”}
continue if {version of operating system <= (parameter “imageVersion”)}
endif
// Run the check only command in silent mode. Successful if return code is -1047526896
if {(parameter “runMode”) is “Check Only”}
wait "{(parameter “dstPath”) & “/upgradeCheckSilent.bat”}"
continue if {exists file ((parameter “dstPath”) & “\out.log”) whose (exists lines whose (it as string = "-1047526896 ") of it)}
endif
// Run upgrade in silent mode. Successful if return code is 0
if {(parameter “runMode”) is “Upgrade”}
wait "{(parameter “dstPath”) & “/upgradeSilent.bat”}"
continue if {exists file ((parameter “dstPath”) & “\out.log”) whose (exists lines whose (it as string = "0 ") of it)}
action requires restart
if {version of operating system < “10” as version}
restart 5
else
waithidden cmd.exe /c shutdown /r
notify client forcerefresh
pause while {pending restart}
endif
else
regset “[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\ImageInfo]” “UpgradeStatus”="NoUpgrade"
endif