Hello,
I have the following script, which works perfectly fine from inside of Windows, but when I try to run it in WinPE and from the stage of Preinstall in my task sequence nothing happens.
If I place a pause after when it's meant to run and execute it manually it says:
Start-Process : This command cannot be run due to the error: The specified executable is not
a valid application for this OS platform..
At X:\BIOS\BIOS\DellBiosUpgradePackage-2.5.ps1:32 char:12
+ $Process = Start-Process "$PSScriptRoot\$BiosFileName" $BiosArguments ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationExceptio
n
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartPr
ocessCommand
Script starts here#
#Get Bios Password from File
$BiosPassword = Get-Content .\Bios.txt
#Create Model Variable
$ComputerModel = Get-WmiObject -Class Win32_computersystem | Select-Object -ExpandProperty Model
Copy-Item $ComputerModel\*.exe -Destination $PSScriptRoot
#Get Bios File Name (Uses the Bios EXE file in the same folder)
$BiosFileName = Get-ChildItem $ComputerModel\*.exe -Verbose | Select -ExpandProperty Name
#Get Bios File Name (No Extension, used to create Log File)
$BiosLogFileName = Get-ChildItem $ComputerModel\*.exe -Verbose | Select -ExpandProperty BaseName
$BiosLogFileName = "$BiosLogFileName.log"
#Set Command Arguments for Bios Update /p=$BiosPassword
$BiosArguments = "/s /p=$BiosPassword /l=$LogPath\$BiosLogFileName"
$Process = Start-Process "$PSScriptRoot\$BiosFileName" $BiosArguments -Wait -PassThru
Reason to this is that previous tool Flash64W.exe /b=<BIOS-file> doesn't work with newer Dell models, it says:
Error: Invalid Command Line
Unrecognized command line option </b>. The /? will show command help
I'd appreciate any help to accomplish bios update from winpe on newer Dell computers.