This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
userspace:dellbios [2015/09/14 11:47] tobias [DellBios v2] |
userspace:dellbios [2015/09/14 11:50] tobias [Dell Bios Settings v2] |
||
---|---|---|---|
Line 524: | Line 524: | ||
- | ===== | ||
Tree:\\ | Tree:\\ | ||
< | < | ||
Line 605: | Line 604: | ||
│ │ | │ │ | ||
│ ├── setup3264.opsiscript | │ ├── setup3264.opsiscript | ||
+ | </ | ||
+ | |||
+ | ===== Script: Setup3264.opsiscript ===== | ||
+ | |||
+ | < | ||
+ | [ACTIONS] | ||
+ | SetLogLevel = 6 | ||
+ | |||
+ | DefVar $INST_SystemType$ | ||
+ | DefVar $INST_architecture$ | ||
+ | DefVar $ExitCode$ | ||
+ | DefStringList $ErrorCodesList$ | ||
+ | set $ErrorCodesList$ = loadTextFile (' | ||
+ | DefStringList $ErrorCodeString$ | ||
+ | DefVar $ErrorCode$ | ||
+ | DefVar $ErrorCodeDescription$ | ||
+ | |||
+ | Set $INST_SystemType$ = GetSystemType | ||
+ | |||
+ | DefVar $RebootWanted$ | ||
+ | Set $RebootWanted$ = GetProductProperty(" | ||
+ | |||
+ | |||
+ | |||
+ | DefVar $SetHDDPassword$ | ||
+ | Set $SetHDDPassword$ = GetProductProperty(" | ||
+ | Defvar $HDDPWDOptions$ | ||
+ | |||
+ | DefVar $HDDPassword$ | ||
+ | Set $HDDPassword$ = GetProductProperty(" | ||
+ | |||
+ | DefVar $currentHDDPassword$ | ||
+ | Set $currentHDDPassword$ = GetProductProperty(" | ||
+ | |||
+ | |||
+ | |||
+ | DefVar $SetBIOSPassword$ | ||
+ | Set $SetBIOSPassword$ = GetProductProperty(" | ||
+ | DefVar $BIOSPWDOptions$ | ||
+ | |||
+ | DefVar $BIOSPassword$ | ||
+ | Set $BIOSPassword$ = GetProductProperty(" | ||
+ | |||
+ | DefVar $CurrentBIOSPassword$ | ||
+ | Set $CurrentBIOSPassword$ = GetProductProperty(" | ||
+ | |||
+ | |||
+ | |||
+ | DefVar $SetWOL$ | ||
+ | Set $SetWOL$ = | ||
+ | |||
+ | DefVar $WOL$ | ||
+ | Set $WOL$ = GetProductProperty(" | ||
+ | |||
+ | DefVar $Change_HDDPassword$ | ||
+ | |||
+ | ; ---------------------------------------------------------------- | ||
+ | ; - 64Bit - | ||
+ | ; ---------------------------------------------------------------- | ||
+ | if $INST_SystemType$ = "64 Bit System" | ||
+ | if $SetHDDPassword$ = " | ||
+ | if NOT ($CurrentHDDPassword$ = " ") | ||
+ | set $HDDPWDOptions$ = " | ||
+ | else | ||
+ | set $HDDPWDOptions$ | ||
+ | endif | ||
+ | Winbatch_BIOS_Config_HDDPWD_x64 | ||
+ | set $exitcode$ = getLastExitcode | ||
+ | for %s% in $ErrorCodesList$ do Sub_Check_Exitcode | ||
+ | opsiServiceCall_report_new_HDD_password | ||
+ | |||
+ | endif | ||
+ | |||
+ | if $SetBIOSPassword$ = " | ||
+ | if NOT ($CurrentHDDPassword$ = " ") | ||
+ | set $BIOSPWDOptions$ = " | ||
+ | else | ||
+ | set $BIOSPWDOptions$ | ||
+ | endif | ||
+ | Winbatch_BIOS_Config_BIOSPWD_x64 | ||
+ | set $exitcode$ = getLastExitcode | ||
+ | for %s% in $ErrorCodesList$ do Sub_Check_Exitcode | ||
+ | opsiServiceCall_report_new_BIOS_password | ||
+ | |||
+ | endif | ||
+ | |||
+ | if $SetWOL$ = " | ||
+ | Winbatch_BIOS_Config_WOL_x64 | ||
+ | set $exitcode$ = getLastExitcode | ||
+ | for %s% in $ErrorCodesList$ do Sub_Check_Exitcode | ||
+ | |||
+ | |||
+ | endif | ||
+ | endif | ||
+ | |||
+ | |||
+ | ; ---------------------------------------------------------------- | ||
+ | ; - 32Bit - | ||
+ | ; ---------------------------------------------------------------- | ||
+ | if $INST_SystemType$ = "x86 System" | ||
+ | if $SetHDDPassword$ = " | ||
+ | Winbatch_BIOS_Config_HDDPWD_x64 | ||
+ | set $exitcode$ = getLastExitcode | ||
+ | for %s% in $ErrorCodesList$ do Sub_Check_Exitcode | ||
+ | opsiServiceCall_report_new_HDD_password | ||
+ | endif | ||
+ | |||
+ | |||
+ | if $SetBIOSPassword$ = " | ||
+ | Winbatch_BIOS_Config_BIOSPWD_x64 | ||
+ | set $exitcode$ = getLastExitcode | ||
+ | for %s% in $ErrorCodesList$ do Sub_Check_Exitcode | ||
+ | opsiServiceCall_report_new_BIOS_password | ||
+ | endif | ||
+ | |||
+ | |||
+ | if $SetWOL$ = " | ||
+ | Winbatch_BIOS_Config_WOL_x64 | ||
+ | set $exitcode$ = getLastExitcode | ||
+ | for %s% in $ErrorCodesList$ do Sub_Check_Exitcode | ||
+ | endif | ||
+ | endif | ||
+ | |||
+ | |||
+ | if $RebootWanted$ = " | ||
+ | ExitWindows /Reboot | ||
+ | endif | ||
+ | |||
+ | |||
+ | [Winbatch_BIOS_Config_HDDPWD_x64] | ||
+ | %scriptpath%\files\x86_64\cctk.exe $HDDPWDOptions$ | ||
+ | |||
+ | [Winbatch_BIOS_Config_BIOSPWD_x64] | ||
+ | %scriptpath%\files\x86_64\cctk.exe $BIOSPWDOptions$ | ||
+ | |||
+ | [Winbatch_BIOS_Config_WOL_x64] | ||
+ | %scriptpath%\files\x86_64\cctk.exe --wakeonlan=$WOL$ --valsetuppwd=$CurrentBIOSPassword$ | ||
+ | |||
+ | |||
+ | [opsiServiceCall_report_new_BIOS_password] | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ] | ||
+ | |||
+ | |||
+ | [opsiServiceCall_report_new_HDD_password] | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ] | ||
+ | |||
+ | |||
+ | [Sub_Check_Exitcode] | ||
+ | SetLogLevel = 5 | ||
+ | if takeString(0, | ||
+ | if not ($ExitCode$ = " | ||
+ | LogError takeString(1, | ||
+ | isFatalError $ExitCode$ | ||
+ | else | ||
+ | message "BIOS Command was Successful" | ||
+ | EndIf | ||
+ | endif | ||
</ | </ | ||