The second method is to manually create these values in the following registry location:
- HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\<driver name>
Registry Value | Description | Example | ||
DisplayName | Name of your driver for service list | my_driver | ||
ImagePath | Full NT-style path to the driver (or just the filename if it lives in system32\drivers). | \??\C:\drv\drv.sys | ||
Start | How the driver can be started. For testing the recommended value is Demand (3), which indicates that the driver can only be started manually.
The other start values - Boot (0), System (1) and Auto (2) instruct Windows to load the driver at various points during the system startup. The last value - Disabled (4) - prevents the driver from loading at all. | 3 | ||
Type | The type of service. Basic kernel drivers must have a value of "1" here. | 1 |
Starting a Driver
Once a driver has been registered as a system-service, it can be loaded (and unloaded) using the Service Control Manager.
- programmatically:
StartService API call. - command-prompt:
net start my_driver
- programmatically:
ControlService API call. - command-prompt:
net stop my_driver
No comments:
Post a Comment