суббота, 24 ноября 2012 г.

[EN] Windows 7 boots up too fast, no network

Today I bought a new PC. After optimizing It, I enabled auto log on, installed some network-dependend software, put It to startup and restarted my PC.
After reboot, I saw messages from all software I put to startup about "No network found" or "Host unreachable", etc.
I noticed, that my OS loads starts thoose programs before network comes up. It was a problem.

First, I tried policy "Always wait for network on computer startup". But it did not work (I don't know why. Maybe because I have Auto LogOn, or my machine is not in domain, or because I have no password installed, or my user have a local profile, or (your reason here)).

I started thinking. First, I noticed that my adapter (Intel 82579V, e1express system driver) notifies system ater about 4 sseconds after cable is connected. I went to adapter properties and changed

  • Energy Efficient Ethernet: OFF
  • System Idle Power Saver: DISABLED
  • Priority & VLAN: Priority & VLAN DISABLED
  • Wait for Link: On
It gave me some time, but not enough yet. I had to make something to have a 100% chance to boot with network, if it is connected.
Here is my script on PasteBin (http://pastebin.com/gQLi5tCV)
I've added it to COMPUTER StartupScripts using GPEDIT.MSC
NOTE: Add this as: Executable: CSCRIPT.EXE Parameters: fileName.vbs, then put VBS file into
C:\Windows\System32\GroupPolicy\Machine\Scripts\Startup using Show files button
 Also I enabled Syncronious script execution to prevent async.

All works great!

Script gets all physical (PhysicalAdapter = True)  ethernet  (AdapterTypeID = 0) adapters listed in system.
Then counts them, excluding VMware adapters (I use VMware, so, they are excluded)
If it found 1 or more adapters, it begins checking them for connection estabilished status each 500ms (objAdapter.NetConnectionStatus = 2), otherwise exits. If it finds connected adapter, it exits and continues boot.

If no adapters become connected in cnt_timeout = 120 seconds, it exits anyway

Комментариев нет:

Отправить комментарий