Page 1 of 1

How to add image path of driver to registry??

Posted: Tue Jan 19, 2016 6:56 am
by shijin
I have written a sample driver for printing commands. It is loaded using OSRLoader tool.

But i am looking for starting this driver as service automatically (using batch file).

I have created a registry key using "REG ADD" command and some key values inside that.

There is a key "ImagePath" showing location of .sys file. I will be running this driver from external USB device, so the path to the driver is not predefined.

How we can add path according to the drive mounted each time?Is there is any parameter to detect the directory where the execution is started (like external drives)?