Windows 7 Network Card Sleep Bug
Windows 7 has this fun bug where the network card will sometimes disable itself when going in to sleep mode, but then fail to re-enable itself when the machine is brought back up, or even restarted. The only fix is to run down to the machine and log in (locally, if on a domain) as an Administrator and re-enable it. Obviously, this is a pain when you have 1000 PCs.
Is there any way to manage this with the K1000? I've tried setting up an Offline KScript that runs the following bat file:
netsh interface set interface "Local Area Connection" ENABLED
Unforunately, this doesn't seem to work. I have it set to run at machine bootup, at user login, run while disconnected, and run while logged off. None of that helps. I've verified that the command works fine if run through the command prompt, so I'm a little confused why it won't work while running as a script.
Is there any way to manage this with the K1000? I've tried setting up an Offline KScript that runs the following bat file:
netsh interface set interface "Local Area Connection" ENABLED
Unforunately, this doesn't seem to work. I have it set to run at machine bootup, at user login, run while disconnected, and run while logged off. None of that helps. I've verified that the command works fine if run through the command prompt, so I'm a little confused why it won't work while running as a script.
0 Comments
[ + ] Show comments
Answers (6)
Please log in to answer
Posted by:
ms01ak
12 years ago
Try disabling the power management feature on the network card From the Device Manager->network adapter->network card right click properties ->power management uncheck "Allow the computer to turn off this device to save power" . I also found a kb hotfix KB980295 that does resolve some 802.1x/networking issues that I've been experiencing as well that might help.
I'm working on a script to turn that power management feature off.
I'm working on a script to turn that power management feature off.
Posted by:
jverbosk
12 years ago
I ran into this a few weeks ago on one of my Win7 laptops as well. One idea might be to create a batch file with the command you listed and have that run via Task Scheduler (locally, after login or machine startup). There's also a way to create tasks via command line (schedtask, if memory serves me correctly). There's probably a way to set this up via the kbox with either a script or a managed install. I'll take a look when I'm back in the office on Monday, as I'm starting to roll out Win7 now (finally got all of my scripted installs working!) and I definitely want to find a fix for this before it becomes pervasive.
John
John
Posted by:
jverbosk
12 years ago
OK, here's a batch file command that:
1) Creates a batch file on C: with the netsh command (Win7NIC.bat)
2) Creates a scheduled task to run the batch file on start (prior to login)
echo netsh interface set interface "Local Area Connection" ENABLED > C:\Win7NIC.bat
SCHTASKS /Create /RU "" /SC ONSTART /TN Enable_NIC /TR C:\Win7NIC.bat
exit
I tested running this manually on my system (without rebooting) and also on a test laptop, running the batch file manually and deployed via the KBOX. I disabled the NIC, rebooted and verified that the NIC comes back up at the login screen several times and it works everytime. I'll be deploying this to all of my Win7 systems.
Here's the parameters I used for setting it up on the KBOX:
Script Type: Online KScript
Name: Enable NIC (Win7)
Support OS: Windows 7
Run As: Run As Local System
Verify
Verify a file exists...
Directory: C:
File: Win7NIC.bat
On success
Log message...
Win7NIC batch & schedule already present.
Remediation
Script name: Win7NIC.bat
Batch file: echo netsh interface set interface "Local Area Connection" ENABLED > C:\Win7NIC.bat
SCHTASKS /Create /RU "" /SC ONSTART /TN Enable_NIC /TR C:\Win7NIC.bat
exit
X Wait for startup
On Remediation Success
Log message...
Win7NIC batch & schedule successfully created.
On Remediation Failure
Log message...
Failed to create Win7NIC batch & schedule.
Hope that helps!
John
1) Creates a batch file on C: with the netsh command (Win7NIC.bat)
2) Creates a scheduled task to run the batch file on start (prior to login)
echo netsh interface set interface "Local Area Connection" ENABLED > C:\Win7NIC.bat
SCHTASKS /Create /RU "" /SC ONSTART /TN Enable_NIC /TR C:\Win7NIC.bat
exit
I tested running this manually on my system (without rebooting) and also on a test laptop, running the batch file manually and deployed via the KBOX. I disabled the NIC, rebooted and verified that the NIC comes back up at the login screen several times and it works everytime. I'll be deploying this to all of my Win7 systems.
Here's the parameters I used for setting it up on the KBOX:
Script Type: Online KScript
Name: Enable NIC (Win7)
Support OS: Windows 7
Run As: Run As Local System
Verify
Verify a file exists...
Directory: C:
File: Win7NIC.bat
On success
Log message...
Win7NIC batch & schedule already present.
Remediation
Script name: Win7NIC.bat
Batch file: echo netsh interface set interface "Local Area Connection" ENABLED > C:\Win7NIC.bat
SCHTASKS /Create /RU "" /SC ONSTART /TN Enable_NIC /TR C:\Win7NIC.bat
exit
X Wait for startup
On Remediation Success
Log message...
Win7NIC batch & schedule successfully created.
On Remediation Failure
Log message...
Failed to create Win7NIC batch & schedule.
Hope that helps!
John
Posted by:
aggybong
12 years ago
Posted by:
WGM_Jeff
12 years ago
We were having the same type of problem. One of our guys found a reg file that solved the problem for us. Just save the following as a .reg file and push it to the machines. This fixed it for us.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0\DefaultPowerSchemeValues]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0\DefaultPowerSchemeValues\381b4222-f694-41f0-9685-ff5bb260df2e]
"AcSettingIndex"=dword:00003840
"DcSettingIndex"=dword:00003840
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0\DefaultPowerSchemeValues\8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c]
"AcSettingIndex"=dword:00003840
"DcSettingIndex"=dword:00003840
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0\DefaultPowerSchemeValues\a1841308-3541-4fab-bc81-f71556f20b4a]
"AcSettingIndex"=dword:00003840
"DcSettingIndex"=dword:00003840
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0\DefaultPowerSchemeValues]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0\DefaultPowerSchemeValues\381b4222-f694-41f0-9685-ff5bb260df2e]
"AcSettingIndex"=dword:00003840
"DcSettingIndex"=dword:00003840
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0\DefaultPowerSchemeValues\8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c]
"AcSettingIndex"=dword:00003840
"DcSettingIndex"=dword:00003840
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0\DefaultPowerSchemeValues\a1841308-3541-4fab-bc81-f71556f20b4a]
"AcSettingIndex"=dword:00003840
"DcSettingIndex"=dword:00003840
Posted by:
ms01ak
12 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.