Category Archives: Windows

A computer that is connected to an IEEE 802.1X authenticated network does not connect to the correct network after you resume it from Hibernate mode or Sleep mode


The heading says it all. In this scenario, the computer is not connected to the authenticated Virtual Local Area Network (VLAN) that it previously inhabited. Instead, the computer is connected to an isolated network.

If have this issue, there is an easy fix for Windows 7 machines. Check it here: A computer that is connected to an IEEE 802.1X authenticated network through a VOIP phone does not connect to the correct network after you resume it from Hibernate mode or Sleep mode.

Now if you have Windows XP SP3 computers, you are out of luck. above MSKB says,

Note This issue occurs in Windows XP. However, a hotfix will not be made available because the issue was found outside of the Windows XP mainstream support life cycle.

The same MSKB explains some manual workarounds:

    • Restart the computer.
    • Reset the network adapter. To do this, start an elevated command prompt, type netsh lan reconnect, and then press ENTER.
    • Unplug and then reconnect the network cable.
    • Use a third-party network driver. If a third-party driver, such as Cisco DNE, is installed, this driver changes the behavior and causes automatic authentication.

But I wanted an automatic solution like the hot fix for Windows 7 and Vista machines.  So I wrote the following script and run it at startup on all XP SP3 machines. I am waiting for “PowerManagementEvent”, specifically event 7. When it happens I run “NetSh LAN Reconnect”. Copy and paste the following code in notepad, save it as Wakeup.vbs and run it in Startup. 

You can also download it here: WakeUp.vbs

 

'********************************************************************************************************************
' Script: WakeUp.vbs
' Purpose: When computer wakes up from sleep or hibernation, detect the event and reconnect the LAN interface
' Written by: Anand Venkatachalapathy
' Creation Date: 3/29/2010
'******************************************************************************************************************** 

'No error will be displayed on the screen
On Error Resume Next 

Set oShell = CreateObject("WScript.Shell") 

'Register Power Management Event
Set colMonitoredEvents = GetObject("winmgmts:").ExecNotificationQuery("Select * from Win32_PowerManagementEvent") 

'Never ending loop
Do
  'Collect the event
  Set oSuspend = colMonitoredEvents.NextEvent
  'If the event type is 7, then computer is waking up
  If oSuspend.EventType = 7 Then 
      'Reconnect the LAN interface
    sCmd = "netsh lan reconnect"
    oShell.Run sCmd,0,True
  End If 
  'Sleep for few seconds
  WScript.Sleep 3600
Loop 

'**** End Of Script ****

Windows Server 2008 VM: Hiberfil.sys is filling up Disk Space


This blog post is only valid for “Windows Server 2008” Release 1.

If you run Windows Server 2008 server in VM environment, you should know the following things.

  1. Hibernation feature is ENABLED by default in Windows Server 2008
  2. There are no GUI settings to turn hibernation off
  3. “hiberfil.sys” takes as much as your memory size, sitting in C: and wasting precious disk space in VM

I found out little lately that my Windows Server VMs were running out disk space and took a while to figure out what’s happening.

Solution:

You can disable the hibernation feature by command line tools. There is two step process:

1. Open command prompt in elevated mode (right click on Command prompt icon and select “Run as Administrator”). Type the following command to disable the hibernation feature.

powercfg.exe /hibernate off

2. Access your servers C: root directory from different computer (\Servernamec$) and delete “Hiberfil.sys” file. (if you try to delete this file locally on the server, you are in big surprise)

Hey best thing about this solution is NO REBOOT required. 🙂

Unlocking file or folder: “Cannot delete Folder: It is being used by another person or program”


How many times you get this error message when you try to delete or move a folder or file?

example

OR you may get one of the following error messages depending on the OS flavors.

  • Cannot delete file: Access is denied
  • There has been a sharing violation.
  • The source or destination file may be in use.
  • The file is in use by another program or user.
  • Make sure the disk is not full or write-protected and that the file is not currently in use.

No worries. There is a freeware program that can unlock the folder or file, so you can move on with your life other un-important things.

Head over to Unlocker

“Access Denied” when try to move or copy files to Windows Share


I had an user complaining she can’t copy or move or delete files on a windows share where she had a full access. When I asked her what’s the error message she gets. She said it’s “Access Denied”.

I knew what was going on. I resolved it with the following steps.

Solution 1:

  • Open Command Prompt
  • Type “Net Use”
  • If you see the share already listed with or without a drive name, delete the share with the following command
    • Share without a drive letter: Net Use \servernamesharename /delete
    • Share with a drive letter (network drive): Net Use Drive: /delete
  • Try open the share now

If the above solution doesn’t work, follow the next solution.

Solution 2:

for XP machines:

  • Open Control Panel and Open “User Accounts”

 screenshot.1

  • Click Advanced –> Manage Passwords. Delete any entry if you see related to your Windows Share.

screenshot.2

screenshot.3 

If you use Vista, follow this.

  • Click Orb and type “User account” and select “User Accounts” from the search results
  • Click the link on the left side of the window that says “Manage your network passwords”

image

  • Then as you predicted, delete the password entry of the problematic windows share.

Hope I helped some on your quest of resolving this issue.