No - we are running XP SP2.. with 140+ business unit applications I think we'll be on XP for sometime.
Thanks for you response none the less.
Main Topics
Browse All TopicsI am trying to develope a script that will run as a service and be triggered by an event. I have a VBScripts called - NetworkConnectionEvent
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\wmi")
Set colMonitoredEvents = objWMIService.ExecNotifica
Do While True
Set strLatestEvent = colMonitoredEvents.NextEve
'msgbox "New Connection Found"
CheckNetworkStatus()
Loop
Function CheckNetworkStatus()
blnOnTreasuryNetwork = False
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colConfig = objWMIService.ExecQuery("S
For Each objItem in colConfig
blnOnTreasuryNetwork = True
Exit For
Next
Set colAdapters = objWMIService.ExecQuery("S
For Each objAdapter in colAdapters
If blnOnTreasuryNetwork Then
'Disable Wireless
objAdapter.disable
Else
'Enable Wireless
Call objAdapter.Enable()
End if
Next
End Function
The problem I am getting is the I get an error referring to this line 'objAdapter.disable'. I know it is an object I can use, and I have double-checked the syntax.
Alternatively - If you can think of a better, neater way to capture and event triggered by a wireless card being plugged in/turned on, then I'm happy to hear it. Basically I need to be able to disable the wireless service, regardless of make/model/type whenever the physical NIC gets a DNSDomain name that meets my criteria. unfortunately the only way I can think of doing this is to have something monitoring this, otherwise there would be times/occurrences where wireless and nic connectivity could run together.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: RobSampsonPosted on 2007-10-16 at 19:06:12ID: 20090349
Hi, from here: http://www.microsoft.com/t echnet/tec hnetmag/is sues/2006/ 11/ HeyScri ptingGuy/d efault.asp x
"A question we hear frequently is "How do I enable and disable my network adapters through a script?" Well, we won't hold you in suspense. We'll tell you right now that you can't. At least not until you're running Windows Vista". In Windows Vista two new methods have been added to the Win32_NetworkAdapter class: Enable and Disable."
So, are you using Windows Vista?
Regards,
Rob.