views:

101

answers:

4

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 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 .\.inf

A: 

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.

T.E.D.
The inf can be run manually by right clicking and selecting "install". That is complicated for hte user to do this manually. What i want is an *.exe for reasons stated in the end goal.
Lily
A: 

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.

Rawheiser
The default action for .inf files is to open them in Notepad, so using "start" won't work.
BruceCran
+2  A: 

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

snemarch
+1  A: 

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.

BruceCran
That wont use Windows Installer right? I have a requirement that "Windows Installer or Install Shield must be used". The context in which i work in makes it complicated to change requirements, even if they are outdated.
Lily
WiX produces Windows Installer (MSI) packages, but the .exe produced by dotNetInstaller is just a standard Windows executable. If you need an MSI and don't have other dependencies you can just distribute that without using dotNetInstaller. If you do use dotNetInstaller then you can get the MSI package out of the exe by running it with the "/ExtractCAB" parameter.
BruceCran