USB Driver Installation - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

GSchaller
Posts: 30
Joined: Tue Aug 28, 2007 2:07 am

USB Driver Installation

Hi Folks,

We have a product which works in tandem with a USB external device - everything is 32 bit only but is expected to run on a 64 bit machine. We have an INF file for the USB drivers and it is expecting to use the USB Windows drivers native to that PC. I read the Device Driver page in your Help Manual and it says that AI does not really support hardware drivers. Is that the case here? it isn't internal hardware but I would like the USB device to correctly find and load the drivers each time it is plugged in to the PC. Is this caused by loading the INF file to the right place for Windows to automatically find it?

What I do please?

Geoff Schaller
Software Objectives
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: USB Driver Installation

Hi Geoff,

We are not sure, but it might work for 32bit. However microsoft does not recommend it. You will have to test this to ensure it is working properly.
On 64bit machines however you will need 64bit drivers.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
GSchaller
Posts: 30
Joined: Tue Aug 28, 2007 2:07 am

Re: USB Driver Installation

Sorry, I need to explain better.

The reference to 64 bit was irrelevant - my fault. The driver sys file is in fact usbser.sys which is present on all PCs anyway and will thus be correct for 32/64. It is the INF file which is important because it makes the appropriate reference to usbser.sys. What I am seeking to do is to load the INF with the installer and execute it. I could use a command line along the lines of rundll32 setupapi,InstallHInfSection <sectionname> filename.inf but I was thinking your device installer section might have done this. Maybe it is that I just exxecute this command line?

Thanks,

Geoff
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: USB Driver Installation

Hello,

You can try using rundll to install the .inf as you mentioned. That would probably work.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
GSchaller
Posts: 30
Joined: Tue Aug 28, 2007 2:07 am

Re: USB Driver Installation

Gabriel.

The need is actually very simple. too simple maybe. I have an INF file I need to copy to the Windows INF folder and then I need to use run32dll to execute the INF file. So how do I do with with the installer? There is no application directory, no executables and nothing to anchor the instller. It seems I have to include the files "outside" the setup exe or it doesn't find them. I am happy with a 'Setup always' kind of condition but I was hoping to send just one MSI, unpack the files into some folder somewhere and then execute the run32dll command. So can I do the following: (1) copy some files to disk then (2) run a bat file from the copied files or execute the run32dll AFTER the files are copied? How do I do this please?

Geoff
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: USB Driver Installation

Hi Geoff,

This is easy. Simply place the files you want to install in on the Files and Folders page. If you want them to be temporary, add them as temporary files. Temporary files get created immediately when the installer is run and deleted just before the install finishes. Use a Launch File or Open URL custom action to launch either rundll or a bat.

I hope this helps.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
GSchaller
Posts: 30
Joined: Tue Aug 28, 2007 2:07 am

Re: USB Driver Installation

Ok then it was easy :)

I will experiment. Thank you.
GSchaller
Posts: 30
Joined: Tue Aug 28, 2007 2:07 am

Re: USB Driver Installation

Sorry but it is not working. I attach the AIP and the two files I am trying to use. I copy the two files, use a custom action to run the batch file and then that is all. However the process never installs. It detects an error condition and rolls back. And now I cannot uninstall - it too always rolls back.

Not sure what I am doing wrong.

I can run the batch file manually and all is good.
The installer worked when I made this a pre-condition but then I could not use an MSI
(the boot strap laoder was required - we do not want this)

Thanks for any advice.
Attachments
BMServerINF.zip
INF file I am trying to install plus added files
(3.32 KiB) Downloaded 622 times
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: USB Driver Installation

Hello,

I built your project and tested it on several machine:
- it appears to install correctly on XP and on UAC disabled Vista
- On UAC enabled Windows 7 (and likely on UAC enabled Vista) it fails with an "Installation failed" message generated by the execution of a command inside your bat file.

The following article found by google might help solving the issue:
http://forums.techarena.in/windows-devi ... 222400.htm

I hope this helps.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
GSchaller
Posts: 30
Joined: Tue Aug 28, 2007 2:07 am

Re: USB Driver Installation

Thanks,

Is there a way I can do this without having the batch file?
Can I execute run32dll directly at some point in the install?

The batch file was only to copy the INF to the windows inf folder but of course I can make the installer do this.

Geoff
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: USB Driver Installation

Hi Geoff,

I don't see why not. You can use a Launch File or Open URL predefined custom action, it should work.

Let me know if it helped.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”