Jump to content

Vbs создает Vpn


Recommended Posts

Вот вопрос, кто подкинет скрипт, или подскажет что в этом не так

 

Dim objShell, sName, sHost

Set objShell = WScript.CreateObject("WScript.Shell")

 

sName = "COMPANY NAME"

sHost = "IP ADDRESS OR HOST NAME"

 

With objShell

.Run "Control ncpa.cpl"

wscript.sleep 2000

.AppActivate "Network Connections"

wscript.sleep 1000

.SendKeys "%FN"

wscript.sleep 1000

.SendKeys "%N"

wscript.sleep 1000

.SendKeys "%ON"

wscript.sleep 1000

.SendKeys "%VN"

wscript.sleep 1000

.SendKeys "%A" & sName & "%N"

wscript.sleep 1000

.SendKeys "%DN"

wscript.sleep 1000

.SendKeys "%H" & sHost & "%N"

wscript.sleep 1000

.SendKeys "%AN"

wscript.sleep 1000

.SendKeys "%S"

wscript.sleep 1000

.SendKeys "{TAB}{TAB}~"

wscript.sleep 1000

.SendKeys "{ESC}"

' .AppActivate "Connect " + sName

' .SendKeys "%{F4}"

End With

 

Камнями не кидать, я не програмист, а бейсик я еще 10 лет назад чтото как то проходил :huh:

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...