Bypassing 'OK' dialog box

Welcome Forums General PowerShell Q&A Bypassing 'OK' dialog box

This topic contains 1 reply, has 2 voices, and was last updated by

4 years, 10 months ago.

  • Author
  • #14640

    Points: 0
    Rank: Member

    I am writing a Powershell script to run a few process automatically, but the last .exe ends with an 'OK' dialog box and will not move on to the next command to restart the box until it is acknowledged. I was hoping that maybe if I tried '-WarningAction Continue' common parameters hoping it would acknowledge it, but it didn't. I was wondering if anybody knows a way for it to automatically acknowledge itself, just bypass it after it completes, or should i use something other than 'start-process' cmdlet?

    The end of my script where the dialog box pops up.

    start-process program.exe -wait
    restart-computer -force

  • #14646

    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    External commands, like exes, don't support common parameters. If that command is coded to display a dialog box, there's probably no way around it. It depends entirely on "program.exe" – this isn't, unfortunately, a PowerShell thing.

The topic ‘Bypassing 'OK' dialog box’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort