Jump to content

zxtnt09
 Share

Recommended Posts

Hi guys,

i need to "hide" a process for "10 secounds after show that up again ,

my process is "CMD.exe" , i used " echo off " but it doesn't hide ( go minimized , etc ).

i want to do that , something like that : 

1 ) run > cmd.exe

2 ) something write in cmd , like : ping google.com

3 ) when (2) is running , i don't like it was show , i want hide that ( or minimize )

4 ) back to show after "10 sec" 

thanks, ^_^

 

Link to comment
Share on other sites

The Run command has a HIDE parameter, which is mentioned in the Help file.

You can also make sure you are using the /c switch with CMD.EXE and not the /k switch ... though use that last when needing to troubleshoot.

Taken straight from the RUN command section of the Help file.

Run(@ComSpec & " /c " & 'commandName', "", @SW_HIDE)

Use the WinSetState command to SHOW the window, if you want.

WinSetState("cmd.exe", "", @SW_SHOW)

I'm just guessing that "cmd.exe" is the window title, so you may have to adjust that bit.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

 

Run(@ComSpec & " /c " & 'commandName', "", @SW_HIDE)

it's true but if you what to use something like that:

RunWait(@ComSpec & ' /c ' & 'netsh advfirewall firewall add rule name="test" dir=in action=allow protocol=UDP remoteport =1010 remoteip=0.0.0.0')

@SW_Hide won't work !

because it show you "Ok." in cmd , 

now how to hide all of that !

( no cmd run up / no "Ok." / nooooooooooooo:lol: )

thanks again

Link to comment
Share on other sites

Your problem with RunWait, is that you cannot then use WinSetState.

Unless you run it from a second exe.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
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
 Share

×
×
  • Create New...