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

3/07/2009

3/06/2009

Get installed hotfixes

  1. Here is a command: wmic qfe list full
  2. On XP, go to the registry directly: 
    Instances of this class represent updates found in two places in the registry:

    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\    CurrentVersion\Hotfix

    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates

  3. On Vista, the registry doesn't exist any more. Try the WMI Class: Win32_QuickFixEngineering Class http://msdn.microsoft.com/en-us/library/aa394391(VS.85).aspx

2/09/2009

MaximumTransferSize is oboslete after Win2000

MaximumTransferSize member of the USBD_PIPE_INFORMATION structure is obsolete after Win2000. Systems after win2000 don't care about this value anyway.The USB stack ignores the value in MaximumTransferSize for both composite and non-composite devices, this values will be set to the default.The default values of MaximumTransferSize under Vista are listed below.


1. http://msdn.microsoft.com/en-us/library/ms790486.aspx
2. http://msdn.microsoft.com/en-us/library/ms793357.aspx

2/03/2009

"CTS" is not supported by USBSer.sys?

The usbser.sys assumes that the device has always signaled CTS.
The RTS/CTS hardware handshaking is not implemented in usbser.sys.

1/05/2009

Layered Driver Architecture

http://msdn.microsoft.com/en-us/library/ms791644.aspx

Layered Driver Architecture

Windows operating systems support a layered driver architecture. Every device is serviced by a chain of drivers, typically called a driver stack. Each driver in the stack isolates some hardware-dependent features from the drivers above it.
The following figure shows the types of drivers that could potentially be in a driver stack for a hypothetical device. In reality, few (if any) driver stacks contain all these types of drivers.
Layered Driver Architecture
As the preceding figure shows:
Above the driver stack is an application. The application handles requests from users and other applications, and calls either the Win32 API or a routine that is exposed by the user-mode client driver.
A user-mode client driver handles requests from applications or from the Win32 API. For requests that require kernel-mode services, the user-mode client driver calls the Win32 API, which calls the appropriate kernel-mode client or support routine to carry out the request. User-mode client drivers are usually implemented as dynamic-link libraries (DLL). Printers support many operations that can be performed in user mode, and so typically have user-mode clients; disks and other storage devices, networks, and input devices do not.
A kernel-mode client driver handles requests similar to those handled by the user-mode client, except that these requests are carried out in kernel mode, rather than in user mode.
A device class and miniclass driver pair provides the bulk of the device-specific support. The class driver supplies system-required but hardware-independent support for a particular class of device. Class drivers are typically supplied by Microsoft.
A miniclass driver handles operations for a specific type of device of a particular class. For example, the battery class driver supports common operations for any battery, while a miniclass driver for a vendor's UPS device handles details unique to that particular device. Miniclass drivers are typically supplied by hardware vendors.
A corresponding port driver (for some devices, this is a host controller or host adapter driver) supports required I/O operations on an underlying port, hub, or other physical device through which the device attaches. Whether any such drivers are present depends on the type of device and the bus to which it eventually connects.
All driver stacks for storage devices have a port driver. For example, the SCSI port driver provides support for I/O over the SCSI bus.
For USB devices, a hub and host controller driver pair perform the duties of the port driver. These drivers handle I/O between the devices on the USB bus and the bus itself.
A corresponding miniport driver handles device-specific operations for the port driver. For most types of devices, the port driver is supplied with the operating system, and the miniport driver is supplied by the device vendor.
At the bottom of the figure is the hardware bus driver. Microsoft supplies bus drivers for all the major buses as part of the operating system. You should not attempt to replace these drivers.
Network drivers have their own unique terminology, defined in Windows 2000 and Later Network Architecture and the OSI Model. Nevertheless, network drivers are similarly layered, and each layer isolates device-specific or protocol-specific functionality from the layer above it.
Exactly which drivers are present, and what they are called, depends on the type of device and the bus to which it connects.
Graphics cards, for example, require a display driver, a video port driver, and a video miniport driver. The display driver is analogous to the kernel-mode client driver in the previous figure. It provides general drawing capabilities and can often work with more than one graphics card. The video port driver supports device-independent graphics operations. It works in tandem with the video miniport driver, which provides functionality that is specific to one graphics card (or a family of graphics cards). The paired video port/miniport drivers are analogous to the port/miniport drivers in the figure, and no class/miniclass drivers are present. For more information, see Display Architecture.
For simplicity, filter drivers are not shown in the previous figure. However, a filter driver can fit in at any layer of the driver stack above the hardware bus driver. A filter driver adds value to an existing driver by "filtering" — intercepting and manipulating device I/O. As a general rule, filter drivers do not operate the hardware directly, but work only on data and I/O requests passed to them from the next-higher or next-lower driver.
DirectShow, the Microsoft software for video capture, includes system-supplied filter drivers that run in user mode. These filters act as clients of the kernel-mode stream class driver to expose the underlying video capture technology.

12/29/2008

Unclassified Signature Program for WHQL signature

12.3.2.1 WHQL DTM Test Notes
As indicated in the WHQL documentation, before submitting the driver for testing you need to download Microsoft's Driver Test Manager (DTM) (http://www.microsoft.com/whdc/DevTools/WDK/DTM.mspx) and run the relevant tests for your hardware/software. After you have verified that you can successfully pass the DTM tests, create the required logs package and proceed according to Microsoft's documentation.
When running the DTM tests, note the following:
The DTM test class for WinDriver-based drivers should be Unclassified - Universal Device.
The Driver Verifier test is applied to all unsigned drivers found on the test machine. It is therefore important to try and minimize the number of unsigned drivers installed on the test PC (apart from the test driver - windrvr6.sys).
The USB Selective Suspend test requires that the depth of the under-test USB device in the USB devices tree is at least one external hub and no more than two external hubs deep.
The ACPI Stress test requires that the ACPI settings in the BIOS support the S3 power state.
Verify that the /PAE switch is added to the boot flags in the PC's boot.ini file.
The tests submission requires you to provide a *.pdb debug symbol file and an ouput of the PREfast utility (defects.xml). You can find copies of these files for the windrvr6.sys driver in the WinDriverredist directory. When selecting to rename and rebuild the windrvr6.sys driver module, as explained in section 12.2, a new debug symbols file is created for the driver. (The original defects.xml file is also applicable to the rebuilt driver).
Before submitting the file for certification you need to create a new catalog file, which lists your driver and specific INF file(s), and refer to this catalog file from your INF file(s), as explained above [12.3.2].

https://www.jungo.com/st/support/documentation/windriver/910/wdusb_man_mhtml/node71.html

FAQ for Windows Logo Program V. 3.0
https://www.microsoft.com/whdc/winlogo/VistaLogofaq.mspx


Unclassified Signature Program
https://www.microsoft.com/whdc/winlogo/drvsign/dqs.mspx

12/10/2008

DTM Audio Fidelity Test

Audio Fidelity Test:
http://msdn.microsoft.com/en-us/library/bb961150.aspx
http://www.microsoft.com/whdc/whql/audiofidelity.mspx

The training video on Fidelity Test:
http://download.microsoft.com/download/f/0/5/f05a42ce-575b-4c60-82d6-208d3754b2d6/DTM-AudioFidelityTestingLocal_Training.exe
http://download.microsoft.com/download/f/0/5/f05a42ce-575b-4c60-82d6-208d3754b2d6/DTM-AudioFidelityLogs_Training.exe

The equipment:
Windows Vista Logo Testing
http://ap.com/products/2700/vista_testing
The SYS-2722A-M
Microsoft Corporation has selected the Audio Precision SYS-2722A audio analyzer exclusively for its Windows Vista Logo Program Audio Fidelity tests.
To simplify ordering, Audio Precision has created a special product configuration of the SYS-2722A that includes all the filters and cables required by the Microsoft Driver Test Manager.

The details of test (Chinese):
http://ic.newmaker.com/art_28773.html