From: Bob on 19 Jun 2010 09:14 Don't know if this would be better off in a Windows 7 board or not, but here goes. We're rolling out Windows 7 with SCCM and want to ensure that no matter what, the nic adapter settings are the way we want them. So I'm using one of the standard vbscripts found via goggle to enumerate through nics and set the registry value for PnPCapabilities. http://www.jasemccarty.com/blog/?p=89 is one of the many sites with the same script; I don't know who originally wrote it. Anyway, the part where the script sets the value for the PnPCapabilities entry simply isn't working. I open up regedit and go down to my card's key, then delete the entry for PnPCapabilities. I have the following two lines in my script: objReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath&strDeviceID,"PnPCapabilitiesTest",56 objReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath&strDeviceID,"PnPCapabilities",56 I'm running the script as administrator(it even says so in the dos window's title). The script correctly creates the PnPCapabilitiesTest and assigns it the value of hex 38, decimal 56, so I know I'm running it as a user that can create and modify entries under the CurrentControlSet key. It appears to create the PnPCapabilities key, but the value is set to 0. If I change the value by hand to 38, it sticks. I suppose it is possible that something in the power settings is resetting it after the script runs, but if that were the case, why doesn't it reset it when I change the value by hand? Any ideas on this one? Thanks!
From: Pegasus [MVP] on 19 Jun 2010 17:19 "Bob" <Bob(a)discussions.microsoft.com> wrote in message news:FABDA484-CF15-49B7-A618-610987858D3D(a)microsoft.com... > Don't know if this would be better off in a Windows 7 board or not, but > here > goes. > > We're rolling out Windows 7 with SCCM and want to ensure that no matter > what, the nic adapter settings are the way we want them. So I'm using one > of > the standard vbscripts found via goggle to enumerate through nics and set > the > registry value for PnPCapabilities. http://www.jasemccarty.com/blog/?p=89 > is > one of the many sites with the same script; I don't know who originally > wrote > it. > > Anyway, the part where the script sets the value for the PnPCapabilities > entry simply isn't working. I open up regedit and go down to my card's > key, > then delete the entry for PnPCapabilities. I have the following two lines > in > my script: > > objReg.SetDWORDValue > HKEY_LOCAL_MACHINE,strKeyPath&strDeviceID,"PnPCapabilitiesTest",56 > > objReg.SetDWORDValue > HKEY_LOCAL_MACHINE,strKeyPath&strDeviceID,"PnPCapabilities",56 > > I'm running the script as administrator(it even says so in the dos > window's > title). The script correctly creates the PnPCapabilitiesTest and assigns > it > the value of hex 38, decimal 56, so I know I'm running it as a user that > can > create and modify entries under the CurrentControlSet key. It appears to > create the PnPCapabilities key, but the value is set to 0. If I change > the > value by hand to 38, it sticks. I suppose it is possible that something > in > the power settings is resetting it after the script runs, but if that were > the case, why doesn't it reset it when I change the value by hand? > > Any ideas on this one? > > Thanks! Did you try setting the data manually? If you can't then this is probably not a scripting but a Win7 issue.
|
Pages: 1 Prev: Can this VBA be translated to VBScript? Next: Server Check Health Script Needed |