Jump to content

Help with create simple script


Recommended Posts

Topic said what i need :(

What function i must use?

I think the best way will be "Disconnect" and after "Connect" with my Connection.

Dont have Enlish Windows, but it should be (in Vista)

Start / Connect With / <MyConnection> / Disconnect

and next time just Connect with <MyConnection>

Maybe

_WinNet_UseConnection

or

_WinNet_RestoreConnection

O_o

Thx for any help

This world is crazy

Link to comment
Share on other sites

I dont know about _WinNet*, though couldnt you use ipconfig?

As in:

RunWait(@ComSpec & " /c " & "ipconfig /release")
RunWait(@ComSpec & " /c " & "ipconfig /flushdns")
RunWait(@ComSpec & " /c " & "ipconfig /renew")
Link to comment
Share on other sites

If it's a dial-up connection I'll use "rasdial" on the CMD

Open up CMD, type "rasdial /?" (no quotes) to look for switches.

$STDOUT_CHILD = 2

$o = Run(@ComSpec & " /c " & 'rasdial "Dialup profile name"', "","",$STDOUT_CHILD)

$output = StdoutRead($o)

ConsoleWrite($output)

This work very good for connect, but need something like this for disconnect :(

ipconfig /relase doesnt work on my PC :f

I have admin rights

This world is crazy

Link to comment
Share on other sites

This work very good for connect, but need something like this for disconnect :(

ipconfig /relase doesnt work on my PC :f

I have admin rights

Edit: Ok nevermind, You > /? > all :)

Problem solved

Edit2: Omg i wanted to edit post, not quote xD

Edited by Sobiech

This world is crazy

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...