close dos box of binary running

2 posts in this topic

#1 ·  Posted (edited)

I use:

$a=run(@ComSpec & ' /c "persist.exe"')

to execute "persist.exe" that remains running.

In Win7 with


i can to close the windows from "persist.exe" and "persist.exe" remains running but in win10 it not work because remains windows with conhost.exe process.

How to close the dos windows that launch a dos software that remains running?

Edited by Ontosy

Share this post

Link to post
Share on other sites

#2 ·  Posted (edited)

start the program without displaying the "DOS Box":


run(@ComSpec & ' /c "persist.exe"',@TempDir,@SW_HIDE)


Or start the program directly, without a "launching" CMD box:



<edit: Quotation typo, 2nd code window>

Regards, Rudi.

Edited by rudi
unable to edit the "CODE", there is a "' behind the .EXE, that should be a " only.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now