Sign in to follow this  
Followers 0
Mika

I want Cmd console to be hidden

6 posts in this topic

Hi, i have this script, and it opens cmd, but i want it to open cmd as hidden, if u can do it, help me

Run("cmd.exe")

Sleep(500)

Send("ipconfig /release{ENTER}")

Sleep(800)

Send("ipconfig /renew{ENTER}")

Sleep(700)

Send("exit{ENTER}")

Share this post


Link to post
Share on other sites



From Help File:

Remarks

To run DOS (console) commands, try Run(@ComSpec & " /c " & 'commandName', "", @SW_HIDE)

So this would be your script.

Run(@ComSpec & " /c ipconfig /release","",@SW_HIDE)
Sleep(800)
Run(@ComSpec & " /c ipconfig /renew","",@SW_HIDE)

Share this post


Link to post
Share on other sites

This still wont get the whole console hidden, just the commands. :?

Share this post


Link to post
Share on other sites

It does what your original script did a lot faster, hidden and better. So, what exactly do you want?

Share this post


Link to post
Share on other sites

I wanted this and i got it thx for u m8 =) im happy now

Run(@ComSpec & " /c " & 'cmd.exe', "", @SW_HIDE)

Sleep(500)

Run(@ComSpec & " /c ipconfig /release","",@SW_HIDE)

Sleep(800)

Run(@ComSpec & " /c ipconfig /renew","",@SW_HIDE)

Sleep(800)

Run(@ComSpec & " /c " & 'exit{ENTER}', "", @SW_HIDE)

Share this post


Link to post
Share on other sites

I wanted this and i got it thx for u m8 =) im happy now

Run(@ComSpec & " /c " & 'cmd.exe', "", @SW_HIDE)

Sleep(500)

Run(@ComSpec & " /c ipconfig /release","",@SW_HIDE)

Sleep(800)

Run(@ComSpec & " /c ipconfig /renew","",@SW_HIDE)

Sleep(800)

Run(@ComSpec & " /c " & 'exit{ENTER}', "", @SW_HIDE)

What you basically do is this:

cmd /c cmd ; Opening cmd using cmd?!? Remove this line

cmd /c exit ; exit is not a valid command!!

So what you have left:

Run(@ComSpec & " /c ipconfig /release","",@SW_HIDE)

Sleep(800)

Run(@ComSpec & " /c ipconfig /renew","",@SW_HIDE)

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