Sign in to follow this  
Followers 0
supergg02

Run a console program without its console appearing

4 posts in this topic

#1 ·  Posted (edited)

Is it possible to run a console mode GUI program without its attendant console appearing ?

I try that using _RunDOS( $sCommand ) but the console appear !! I think because _RunDOS is only for cmd.exe and not for other Exe console

Edited by supergg02

Share this post


Link to post
Share on other sites



run(@comspec & " /c  YOUR COMMAND GOES HERE",'',@SW_HIDE)

--maybe?

~cdkid


AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!

Share this post


Link to post
Share on other sites

run(@comspec & " /c  YOUR COMMAND GOES HERE",'',@SW_HIDE)

--maybe?

~cdkid

no no i said that it not work ! beleive me ! tray to do that with PsExec.exe (a freeware console program from sysinternal) and you will see that doing that it will appear a console !!

run(@comspec & " /c YOUR COMMAND GOES HERE",'',@SW_HIDE) is only for internal dos command !!

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

no no i said that it not work ! beleive me ! tray to do that with PsExec.exe (a freeware console program from sysinternal) and you will see that doing that it will appear a console !!

run(@comspec & " /c YOUR COMMAND GOES HERE",'',@SW_HIDE) is only for internal dos command !!

Your last statement is incorrect :lmao: . @Comspec can execute internal and external commands as the below sample will show. XCopy is an external commandline tool in the system directory. XCopy will be hidden for 5 seconds then closed.

$pid = Run(@ComSpec & ' /k xcopy /?', '', @SW_HIDE)
Sleep(5000)
ProcessClose($pid)

If PsExec does not hide, the you maybe able to use PsExec directly:

Run('path_to\psexec.exe /switch', '', @SW_HIDE)
Edited by MHz

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
Sign in to follow this  
Followers 0