Sign in to follow this  
Followers 0
Sobiech

Help with create simple script

5 posts in this topic

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

Share this post


Link to post
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")

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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)
Edited by MiserableLife

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

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