zxtnt09 Posted September 27, 2015 Posted September 27, 2015 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.exe2 ) something write in cmd , like : ping google.com3 ) 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,
TheSaint Posted September 27, 2015 Posted September 27, 2015 (edited) 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 September 27, 2015 by TheSaint zxtnt09 1 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)
zxtnt09 Posted September 27, 2015 Author Posted September 27, 2015 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 )thanks again
JohnOne Posted September 27, 2015 Posted September 27, 2015 Then add the @SW_HIDE flag to it. zxtnt09 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
zxtnt09 Posted September 27, 2015 Author Posted September 27, 2015 thanks guys, i should use two paramets : •1 by TheSaint ) WinSetState•2 by JohnOne ) Set @SW_HIDE to flag
TheSaint Posted September 27, 2015 Posted September 27, 2015 Your problem with RunWait, is that you cannot then use WinSetState.Unless you run it from a second exe. zxtnt09 1 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)
zxtnt09 Posted September 28, 2015 Author Posted September 28, 2015 Example for other people : Run(@ComSpec & ' /c ' & 'ping google.com',"",@SW_HIDE)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now