SublimeText / VBScript

VBScript package for Sublime Text
https://github.com/SublimeText/VBScript
183 stars 49 forks source link

I need to update this code for run in windows 7 #20

Closed bsfoolery closed 8 years ago

bsfoolery commented 8 years ago

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

MattDMo commented 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.

FichteFoll commented 8 years ago

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.

MattDMo commented 8 years ago

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 :)

FichteFoll commented 8 years ago

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.