Jump to content

Recommended Posts

Posted (edited)

I use:

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

to execute "persist.exe" that remains running.

In Win7 with

processClose($a)

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
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:

run("persist.exe",@TempDir,@SW_HIDE)

 

<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!

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
×
×
  • Create New...