After using Symantec Ghost to re-image a laptop with Windows XP and a wireless card, for some reason, it will be unable to detect any wireless networks. The card is on and multiple wireless networks are available in the area (confirmed by another laptop of the exact same model that hasn’t been re-imaged yet). This problem has reproduced itself on a Fujitsu and HP laptop with an Atheros and Intel wireless card respectively, so I assume we are not alone with this issue and figure it is not a driver issue.
The fix is to uninstall the wireless card from the device manager.
- Right-click My Computer and go to Manage.
- In the Computer Management window, select Device Manager in the left pane.
- Click the ‘+’ (plus) next to Network Adapters to expand the category.
- Right-click on the wireless card (ex. Intel(R) Wireless WiFi Link 4965AG)
- Select ‘Uninstall’
- After the device is removed, click the ‘Scan for new hardware’ button at the top.
- The device will be re-installed and should now detect wireless networks.
This can be scripted using the devcon tool that Microsoft provides as a command-line alternative to the device manager.
The script can be used in two places:
- Immediately before collecting the image, you can uninstall the device.
- After re-imaging, you can uninstall and re-install the device like above.
To uninstall the device before collecting the image, create a batch script (text file with the file extension .bat) with this command in it:
devcon remove “PCIVEN_8086&DEV_4229&subsys_10008086”
The part in the quotes will change for you depending on what brand and model your wireless card is. You can find out what to replace it with by browsing the Device Manager:
- Right-click My Computer and go to Manage.
- In the Computer Management window, select Device Manager in the left pane.
- Click the ‘+’ (plus) next to Network Adapters to expand the category.
- Right-click on the wireless card (ex. Intel(R) Wireless WiFi Link 4965AG)
- Select ‘Properties’
- Click the ‘Details’ tab.
- There will be a drop-down menu, choose ‘Matching Device ID’ or ‘Device Instance Id’
- The entry under there will be ‘PCIVEN_…” (followed by unique numbers to your device)
- Open a command prompt and run the command: devcon find “PCIVEN_…” (add your unique numbers to the command)
As long as only one device is found (your wireless card), you can use that number. You may have to have more numbers or you might be able to reduce the numbers depending on how specific you have to be to find the wireless device. For example:
devcon find “PCIVEN_8086”
21 matching devices found.
devcon find “PCIVEN_8086&dev_4229”
1 matching device found.
devcon find “PCIVEN_8086&dev_4229&subsys_10008086”
1 matching device found.
I can make my command use the second number if I’m lazy since only one device was found:
devcon remove “PCIVEN_8086&dev_4229”
or the third number if I want to be most specific:
devcon remove “PCIVEN_8086&dev_4229&subsys_10008086”
To implement the after-image scripting solution, we’ll use the above command to uninstall and follow it by another to automatically scan for new hardware. Put the following two commands in a batch command and replace the “PCIVEN_…” part with your numbers found above.
devcon remove “PCIVEN_8086&dev_4229”
devcon rescan
This will uninstall and re-install the device, the exact same fix that we were using through the device manager but with only one double-click to implement the solution.
Download Devcon command-line tools from Microsoft.