Mika Posted December 3, 2007 Posted December 3, 2007 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}")
Nahuel Posted December 3, 2007 Posted December 3, 2007 From Help File:RemarksTo 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)
Mika Posted December 3, 2007 Author Posted December 3, 2007 This still wont get the whole console hidden, just the commands. :?
Nahuel Posted December 3, 2007 Posted December 3, 2007 It does what your original script did a lot faster, hidden and better. So, what exactly do you want?
Mika Posted December 3, 2007 Author Posted December 3, 2007 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)
jvanegmond Posted December 3, 2007 Posted December 3, 2007 I wanted this and i got it thx for u m8 =) im happy nowRun(@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 linecmd /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) github.com/jvanegmond
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