4/27/2009

How to remove phantom/ghost devices

  • What is phantom devices

Hidden, inactive deives, ghost devices. When a device is physically removed from a machine, the driver becomes a phantom and is no longer visible in Device Manager. Normally this is desirable, but can be a problem if you wish to remove the device driver.

  • How to identify and remove phantom devices in device manager (manually)?

do the following:
1. From the command prompt on the problem media server, run:C:\>set devmgr_show_nonpresent_devices=1C:\>start devmgmt.msc
2. Then, select View from the drop down and select to Show Hidden Devices.At this point, any ghost tape devices will be seen with lighter, transparent icon and can be removed. This is done by right-clicking the ghost tape device and selecting "Uninstall".

  • How to do this programming...

devcon command works!

Find * FindAll * Remove "@hwid"

Here is a script works...

4/14/2009

Run program as Local System Account

To delete registry keys under Vista...

This article which demonstrates the use of PSTools from SysInternals which was acquired by Microsoft in July, 2006. I launched the command line and issued the following statement and suddenly I was running under the Local System Account like magic:

psexec -i -s cmd.exe

PSTools worked great.


http://verbalprocessor.com/2007/12/05/running-a-cmd-prompt-as-local-system

http://download.sysinternals.com/Files/PsTools.zip


To ignore a device's serial number

http://www.lvr.com/usbfaq.htm

During device testing, we attach many devices that are identical except for the serial numbers. How can I prevent Windows from asking to install a new driver every time a device is attached?

This method causes Windows 2000 and XP to ignore a device's serial number. It's recommended for test environments only.

This registry key controls whether Windows uses or ignores device serial numbers:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\UsbFlags]


It's possible to ignore all serial numbers, though this approach is NOT recommended. To ignore all serial numbers, in the above key, change this value to zero:

GlobalDisableSerNumGen = 1

To ignore the serial number for an individual device, create an entry under the above ...\UsbFlags key. The name must
start with "IgnoreHWSerNum" followed by the vendor and product ID of the device. A value of 1 = disable the serial number.

Example (Vendor ID = 0925h, Product ID = 016Ah):

IgnoreHWSerNum0925016A= 1