Lock Keyboard and Mouse for Installation as example for BIOS Update

//Lock Keyboard and Mouse for Installation as example for BIOS Update
Lock Keyboard and Mouse for Installation as example for BIOS Update 2015-05-22T05:42:24+00:00

The Toolkit Forums Deployment Scripts Lock Keyboard and Mouse for Installation as example for BIOS Update

  • Author
    Posts
  • André
    Participant
    Post count: 9
    #247 |

    `If ($Battery -like “False”)
    {
    function Lock-Screen([ScriptBlock] $Payload={Start-Sleep -Seconds 5}, $Title=’Busy, go away.’)
    {
    try
    {
    $window = New-Object Windows.Window
    $label = New-Object Windows.Controls.Label

    $label.Content = $Title
    $label.FontSize = 50
    $label.FontFamily = ‘Consolas’
    $label.Background = ‘Transparent’
    $label.Foreground = ‘Red’
    $label.HorizontalAlignment = ‘Center’
    $label.VerticalAlignment = ‘Center’

    $Window.AllowsTransparency = $True
    $Window.Opacity = .7
    $window.WindowStyle = ‘None’
    $window.Content = $label
    $window.Left = $window.Top = 0
    $window.WindowState = ‘Maximized’
    $window.Topmost = $true

    $null = $window.Show()
    Invoke-Command -ScriptBlock $Payload
    }
    finally { $window.Close() }
    }

    $job =
    {
    Execute-Process -FilePath “manage-bde” -Arguments “-protectors -disable C:” -WindowStyle Hidden
    sleep 10
    Execute-Process -FilePath “WINUPTP.EXE” -Arguments “/S”
    }

    Lock-Screen -Payload $job -Title ‘ACHTUNG!!! BIOS Update läuft daher NICHT ABSCHALTEN!’
    }
    ELSE
    {
    Show-DialogBox -Title “—> BIOS UPDATE – WICHTIG INFO – BITTE LESEN <—” -Text “ACHTUNG: Das BIOS Update konnte nicht ausgeführt werden da der PC nicht am STROMNETZ angeschlossen ist! Bitte am STROMNETZ anschließen und das BIOS Update erneut starten!!!” -Icon “Exclamation” -TimeOut 600
    Exit-Script -ExitCode “1618”
    }`

    • This topic was modified 2 years, 6 months ago by  André.

You must be logged in to reply to this topic.