I was talking to a friend the other night about scripting and desktop deployments. He works in a team that mainly works on packaging applications for distribution to lots of desktop PCs. When we talk shop I find it a good learning experience for myself as a developer. We’ve all got so complacent in recent years with Web Applications, providing they’ve all got Internet Explorer whatsit then we immediately think of deployment as a copy and paste job into the IIS virtual directory.
He has to think about hundreds of PCs being in various states, logged on, logged off, and funnily enough being switched off can be a real tricky one. Fortunately efforts in the procurement of desktop PCs mean that many with embedded network cards are built to power on with the correct packet from the network, saving a visit, even if they insist on trying to boot off the network – another issue.
We got talking about scripting and network speed, apparently autosense doesn’t do the thing with their switches. I did a bit of Google and msdn research and established that WMI didn’t go there for read/write on that setting. I asked about the hardware and was told that it was a mixture of Intel kit. That is a good thing, Intel are pretty good with their support through their Proset drivers. Had a look through the docs for that, but it looked like I would have to do a bit of vbs hacking to get the setting value pair.
On a different tack I found a utility from Intel themselves to alter the speed directly. Their SETSPEED.EXE script utility takes a single parameter to set the speed and duplex of one of their supported NICs. The main gotcha is that this is a setting that is based in the registry, so you have to kick the driver into re-reading the registry if you change the setting. Either a specific start/stop (I’m not sure if this service based) or a reboot.
The research showed up an interesting option in the SavRes.vbs script which is a vbs implementation of the Proset support for WMI etc. I would probably use this as the start of a script for dealing with more of the settings on a NIC.