[SOLVED] Need Help for hide command prompt in WinPE

Discussion in 'Scripting' started by Chibi ANUBIS, Jun 9, 2020.

  1. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    1,019
    692
    60
    Hello everyone ! :)
    I need a little help for hide the command prompt for my Recovery Project, I used CMDOW but some AV delete this and he didn't work for x64, stupid program...

    I use winpeshl.ini for run my script :
    Code:
    [LaunchApps]
    %WinDir%\System32\RunRecoveryInstall.cmd
    
    Thanks in advance !
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    1,019
    692
    60
    #2 Chibi ANUBIS, Jun 9, 2020
    Last edited: Jun 9, 2020
    (OP)
    @abbodi1406 I hope you can help me... If I use bat to exe and hide the command prompt, you think is good ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,144
    957
    60
    Supposing you have scripting available, try this :
    Code:
    echo CreateObject^("WScript.Shell"^).Run "%WinDir%\System32\RunRecoveryInstall.cmd",0,true >"%temp%\x.vbs"&"%temp%\x.vbs"
    This will create the file x.vbs in the %temp% directory (ie x:\windows\temp) :
    Code:
    CreateObject("WScript.Shell").Run "%WinDir%\System32\RunRecoveryInstall.cmd",0,true
    
    This file is started in a hidden window (the "0" argument) and control is given back (the "true" argument) when %WinDir%\System32\RunRecoveryInstall.cmd" terminates.
    If powershell is available, just "start-process" of %WinDir%\System32\RunRecoveryInstall.cmd" with the the "-wait" and "-windowstyle hidden" parameters.
     
  4. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    1,019
    692
    60
    IS WORK ! THANKS !

    Don't forget to put this in winpeshl.ini
    Code:
    [LaunchApps]
    %WinDir%\System32\wscript.exe,%WinDir%\System32\HideConsole.vbs
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,144
    957
    60
    Content de te rendre service mon pote.