hai
i am karthik. i am having very small doubt. for one of my usb devive, i am having .inf and .sys file. If i plug the device, then i can force manuall to take that files and works well. how can i create one installer to this automatic for installing and removing driver.

help me.
thanks in advance.
karthik

Recommended Answers

All 3 Replies

Once the drivers are installed, the USB device should be reckognized every time you plugg it in. If the driver is not included in windows list of drivers, then you'll need to install the device driver manually or provide hardware installation wizard a floppy or CD with the driver.

There is no need for driver removal afterwards.

Thats ok but still i need to make one exe to put the files in the system 32 directory. if somebody can assis on this to do?

When you rightclick INF file you have "Install" menu item.

The command for "install" is rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 %1

You can make 2 BAT files for install and uninstall commands.

Install.bat:

rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 usbdevice.inf

Uninstall.bat:

rundll32.exe setupapi,InstallHinfSection DefaultUninstall 132 usbdevice.inf

where the "usbdevice.inf" should be changed to filename of the INF file.

These 2 batch files must be in same directory as INF file.

Here are examples attached.

If you need to manually put files in system32 directory, you can use "copy" command.

"Copy file.dll %SystemRoot%\System32\file.dll"

Note that you must use quotation marks on the filename if the filename has spaces in it, or (in case of w95 or w98) if the filename exceeds 8.3 format (ex: copy "very long filename.very long extention").

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.