Jump to content

vbs & wireless


Recommended Posts

Are there ANY examples of how to use visual basic script to access wireless

card ? I'd like to use wireless zero configuration service to query for the

list of available APs and read their signal strengths. I guess that would be the

simplest way, but ANYTHING is welcome.

I managed to get some examples ripped out of some skin file (zipped),

so far i found this :

Wireless Signal Strength
Version 2.2
Created 06th September 2004
Edited 09th March 2005
Copyright 2005, Mike Almond

There is some VB script encapsulated into xml commented with "DXScript Data File"

at the beginning of file.

Any c++ / delphi example code is also welcome. I did found WRAPI, but

it it's a bit complex and reqiures DDK :(

Edited by implodium
Link to comment
Share on other sites

  • 2 years later...

Here is a script I wrote this evening to add wireless profiles to a pc. I am still very new at writing vbs but this was my last resort for adding these connections. I am using a guirunonce at the end of a image to detect what model and run certain scripts per model. This is one of those scripts. I hope it helps someone.

Set Shell=WScript.CreateObject("Shell.Application")
Shell.MinimizeAll
Dim objShell
Set objShell=CreateObject("Wscript.Shell")
'Begin Script
With objShell
.Run "Control ncpa.cpl"
wscript.sleep 8000
.AppActivate "Network Connections"
wscript.sleep 5000
.SendKeys "w"
.sendkeys "{ENTER}"
wscript.sleep 3000
.SendKeys "%V"
wscript.sleep 3000
.AppActivate "Wireless Network Connection"
.SendKeys "+{TAB}"
wscript.sleep 1000
.sendkeys "+{TAB}"
wscript.sleep 1000
.sendkeys "{ENTER}"
wscript.sleep 3000
.SendKeys "%A"
wscript.sleep 3000
.SendKeys "Corp"
.SendKeys "{TAB}"
wscript.sleep 1000
.sendkeys "{DOWN}"
wscript.sleep 1000
.sendkeys "{DOWN}"
wscript.sleep 1000
.SendKeys "{TAB}"
wscript.sleep 3000
.sendkeys "{UP}"
wscript.sleep 1000
.SendKeys "{TAB}"
wscript.sleep 1000
.sendkeys "{TAB}"
wscript.sleep 1000
.sendkeys "{TAB}"
wscript.sleep 1000
.sendkeys "{TAB}"
wscript.sleep 1000
.sendkeys "{RIGHT}"
wscript.sleep 2000
.sendkeys "{TAB}"
wscript.sleep 1000
.sendkeys "{UP}"
wscript.sleep 1000
.sendkeys "%R"
wscript.sleep 2000
.sendkeys "%VE"
wscript.sleep 1000
.sendkeys "{ENTER}"
.sendkeys "{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{RIGHT}"
.SendKeys "%C"
.SendKeys "{ENTER}"
wscript.sleep 2000
.SendKeys "%A"
wscript.sleep 2000
.SendKeys "Guest"
.sendkeys "+{TAB}"
.sendkeys "{RIGHT}"
wscript.sleep 1000
.sendkeys "%E"
.sendkeys "+{TAB}"
.sendkeys "{RIGHT}"
wscript.sleep 2000
.sendkeys "%C"
.sendkeys "{ENTER}"
.sendkeys "{ENTER}"
End With
Set objShell=Nothing
Wscript.Quit
'End Script

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

    • No registered users viewing this page.
×
×
  • Create New...