Jump to content

I want Cmd console to be hidden


Mika
 Share

Recommended Posts

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}")

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...