开发者

How to create a exe that installs a driver

I want to create a very simple .exe that will install a driver. I have an .inf (and all it's DLL files). The driver is for a usb device.

The end goal is to find a simple solution to install a driver with my application installer. The installer is generated using Visual Studio 2008 setup and deployment project. I believe that having a separate exe that does the driver install can be called by my开发者_如何学Python setup and deployment project.

I am a newbie at this so i am looking for a step by step tutorial or something that i can really understand.

Please help :(

EDIT:

The following command line installs the driver just fine. How can I transfer this into a EXE or DLL, which can be launched by custom actions in Visual Studio

rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 .\<file>.inf


Have you checked How do I deploy a .inf based driver?


The Visual Studio Setup & Deployment project is fairly limited in functionality: probably the easiest way to create an installer for your driver is to use WiX and DIFx - you just need to add a difx:Driver tag to your source file and use the WixDifxAppExtension extension when running candle/light. An example from the project I work on can be seen at http://www.bluestop.org/viewvc/repos/sctpDrv/trunk/wix/ - the candle/light commands are in Makefile.wix and module-common.wxs contains the DIFx code.

The output of WiX is an MSI file. If you want a .exe I'd recommend using dotNetInstaller, which can bootstrap any prerequisites before running your MSI.


Doesn't the .inf file itself install the driver?

If for some reason you are using a tool that (unlike say explorer) isn't smart enough to know that is what inf's are for, perhaps you could write a little program that tells windows explorer to run the inf file.


I believe that the 'start' command will run an associated file at the command line.

So a one line script aught to do (example run.cmd file):

start myWordDoc.doc 

That command will open up Word and Load that document.

It 'should' do the same for INF files, let me know if it does.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜