Sign in to follow this  
Followers 0
Starstar

How can i send a Command to "cmd"

4 posts in this topic

#1 ·  Posted (edited)

I want to disconnect a WAN Miniport(PPPoE) i do not know about any methode in autoit that can do it.Therefore i decide do it via cmd.

$DELAY = 250
Run("CMD")
Sleep(500)
Send("rasdial BSNL /disconnect"); BSNL is the name of PPPoE Connection
Sleep($DELAY)
Send("{Enter}")
Sleep($DELAY)
Send("Exit")
Sleep($DELAY)
Send("{Enter}")

There is no way to use ControlSend. because When someone change operating drive. cmd title will also changed for example ("C:\Windows\System32\cmd.exe") If drive changed ("D:Windowssystem32cmd.exe") Windows tittle is changed.

Edited by adnanbaloch

Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once."

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

thanks Neutro.......This is a very good idea.....

Edited by adnanbaloch

Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once."

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

not tested

$PPPoE_Name = "BSNL"
Run("rasdial "&$PPPoE_Name&" /disconnect")
Edited by adnanbaloch

Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once."

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