Nominate our 2022 Qt Champions!

How To Send Enter Key To Cmd.exe Using Qprocess.

  • Hello My Friends
    I Write a Windows Format Program. Before, I Using Windows system Command To Do This.
    The Problem is, It Opened Cmd.exe And Then Ask to Pressing Enter Key To Complete Format Action.
    I Change My Way To Using QProcess Or WinExec And I Need Send Enter Key After Cmd request Enter Key Or Just After a second. Furthermore If This Action Execute On Background Is Ideal For Me.
    How I Can Do This.
    Thank You Very Much.

  • Lifetime Qt Champion

    The format command takes a /y to make it run without asking. (at least on win 7)
    Be carefull when testing it.!. :)

Log in to reply