Closed bsfoolery closed 8 years ago
This is not a programming service, it is a repo for the VBScript plugin for Sublime Text. If you have a programming question, please use Stack Overflow. Before you do, though, please take their tour and carefully read through the help center to learn more about the site, including what is on-topic and what is not, and how to ask a good question. Please also follow the question checklist. At a bare minimum, you'll need to carefully explain your problem and show what you've done to try and solve the problem, and where exactly you're stuck. Stack Overflow is not a programming or tutorial service, but is rather a Question and Answer site where specific programming questions (usually, but not always, including some code) get specific answers.
Did you copy-paste that? I would be way too lazy to compile an answer this verbose for an occurence like this, but I'm also not frequenting SO.
It's mostly copy-pasted. I have a good-sized list of Markdown-formatted comments for SO and a few other SE sites I frequent. It's always open in a Sublime window right next to my browser :)
I have a set of standard replies for reviewing pull requests to the pc channel in my clipboard manager. 10 or so. It would be impossible without.
Set objWMIService = GetObject("winmgmts:.\root\cimv2") Set colNetAdapters = objWMIService.ExecQuery("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
strSubnetMask = Array("255.255.255.0") strGateway = Array("192.168.0.3") strGatewayMetric = Array(1) strDNS = Array("192.168.0.3")
For Each objNetAdapter in colNetAdapters errEnable = objNetAdapter.EnableStatic(strIPAddress, strSubnetMask) errGateways = objNetAdapter.SetGateways(strGateway, strGatewaymetric)
objNetAdapter.SetDNSServerSearchOrder strDNS
Next