MSFN Forum: Driver Installation for project - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Driver Installation for project Rate Topic: -----

#1 User is offline   ravedadave 

  • Group: Members
  • Posts: 5
  • Joined: 31-March 10
  • OS:none specified
  • Country: Country Flag

Posted 31 March 2010 - 11:47 PM

Hi,

I run an open source project called Qemu Manager.

I am day's of releasing the latest version but am having major issues installing a driver.

Its a slightly modified version of the OpenVPN TAP-WIN32 driver.

Driver

The only way at present to install it is using devcon.exe but I don't want to redistribute that due to licensing etc.....
I have also tried dpinst.exe and that fails also.

If anyone can provide an open source/free solution it would be greatly appreciated.

Any suggestions would be welcomed.

Thanks.

Dave.


#2 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,420
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 01 April 2010 - 02:04 AM

There is already a rather known project called Qemu Manager, if I may, you should change slightly the name of your project to avoid confusion.

Hey, wait, the link is on daveryn.co.uk, which is the home of the Qemu Manager!

So you're Dave! :thumbup

Welcome to MSFN, happy to meet you. :)

Back to your problem.
Cannot you use a .inf file? The linked file has one.

I am not an expert at all in using them, but if I managed to put together an install of a service:
http://www.boot-land...?showtopic=9765
you can do it as well.

Basically:
RunDll32.exe setupapi.dll,InstallHinfSection DefaultInstall 128 <your_driver>.inf

and you need a DefaultInstall section in the actual <your_driver>.inf

Just post if you need further help, if you better explain what the driver is for, I can try modifying the .inf and test it.

jaclaz

This post has been edited by jaclaz: 01 April 2010 - 02:05 AM


#3 User is offline   ravedadave 

  • Group: Members
  • Posts: 5
  • Joined: 31-March 10
  • OS:none specified
  • Country: Country Flag

Posted 01 April 2010 - 02:59 AM

View Postjaclaz, on 01 April 2010 - 02:04 AM, said:

There is already a rather known project called Qemu Manager, if I may, you should change slightly the name of your project to avoid confusion.

Hey, wait, the link is on daveryn.co.uk, which is the home of the Qemu Manager!

So you're Dave! :thumbup

Welcome to MSFN, happy to meet you. :)

Back to your problem.
Cannot you use a .inf file? The linked file has one.

I am not an expert at all in using them, but if I managed to put together an install of a service:
http://www.boot-land...?showtopic=9765
you can do it as well.

Basically:
RunDll32.exe setupapi.dll,InstallHinfSection DefaultInstall 128 <your_driver>.inf

and you need a DefaultInstall section in the actual <your_driver>.inf

Just post if you need further help, if you better explain what the driver is for, I can try modifying the .inf and test it.

jaclaz


Hi Jaclaz,

Yes I develop the main Qemu Manager that's been going for about 5 years now.
The site is down at the min as it is being merged with another site ready for the release Qemu Manager 7.0 which is quite a big release.

I have tried the rundll32 solution above as part of my tests, unfortunately it does not work.

The driver is a network card driver. It installs fine if installed via devcon.exe or device manager.
I would really like to have an automted way of installing this driver on demand, it will help other users greatly, and add value to the overall
program.

If you have any other tips it would be appreaciated,


Thanks.

Dave.

#4 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,420
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 01 April 2010 - 03:48 AM

View Postravedadave, on 01 April 2010 - 02:59 AM, said:


I have tried the rundll32 solution above as part of my tests, unfortunately it does not work.

The driver is a network card driver. It installs fine if installed via devcon.exe or device manager.
I would really like to have an automted way of installing this driver on demand, it will help other users greatly, and add value to the overall
program.

If you have any other tips it would be appreaciated,



No, but the method should work.
Please post how you succeed to install it with devcon.exe, and I'll try to make a "working" .inf for it.
(I need to understand how it behaves when succesfully installed)

jaclaz

#5 User is offline   ravedadave 

  • Group: Members
  • Posts: 5
  • Joined: 31-March 10
  • OS:none specified
  • Country: Country Flag

Posted 01 April 2010 - 04:12 AM

View Postjaclaz, on 01 April 2010 - 03:48 AM, said:

View Postravedadave, on 01 April 2010 - 02:59 AM, said:


I have tried the rundll32 solution above as part of my tests, unfortunately it does not work.

The driver is a network card driver. It installs fine if installed via devcon.exe or device manager.
I would really like to have an automted way of installing this driver on demand, it will help other users greatly, and add value to the overall
program.

If you have any other tips it would be appreaciated,



No, but the method should work.
Please post how you succeed to install it with devcon.exe, and I'll try to make a "working" .inf for it.
(I need to understand how it behaves when succesfully installed)

jaclaz



Hi Jaclaz,

Many thanks for taking the time to speak.

I install it by: devcon.exe install oemwin2k.inf tap08qemu.sys

This then installs it. This can be ran multiple times, installing more than one instance of the network adapter.
It shows in the network and sharing center as "Local Area Connection x"

Hope this helps.

Dave.

#6 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,420
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 01 April 2010 - 06:50 AM

No.

The devcon.exe doesn't work for me (XP SP2).



C:\Downloaded\tapdriver\TAPDriver\i386>devcon.exe install oemwin2k.inf t
ap08qemu.sys
Device node created. Install is complete when drivers are updated...
Updating drivers for tap08qemu.sys from C:\Downloaded\tapdriver\TAPDriver\i386\oemwin2k.inf.
devcon.exe failed.


It starts installing but then fails, it seems like there is the need for some other files beside the .sys, :unsure: or maybe it doesn't "connect" properly to the virtual device.

In the .inf there are additional files "REMmed out" by using ; .

Among the Remmed ones there is the "right" way (supposedly) to install this service, which is running tapinstall.exe, which seems like being a file coming with OpenVPN, which should be an equivalent to devcon.exe.

here is a partial output of devcon listclass NET

Quote

ROOT\MS_PTIMINIPORT\0000 : Direct Parallel
ROOT\NET\0000
ROOT\NET\0001
ROOT\NET\0005

ROOT\VMWARE\0000 : VMware Virtual Ethernet Adapter for VMnet1
ROOT\VMWARE\0001 : VMware Virtual Ethernet Adapter for VMnet8

with bolded the devices installed in various attempts.

Something possibly very easy to fix must have been overlooked or it is missing.

jaclaz

#7 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,420
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 01 April 2010 - 09:28 AM

Ok, found the problem with devcon.exe.

You need to change this:
;----------------------------------------------------------------
;                      Manufacturer + Product Section (Done)
;----------------------------------------------------------------
[Manufacturer]
   %Provider% = tap08qemu

[tap08qemu]
   %DeviceDescription% = tap08qemu.ndi, tap08qemu


to this:
[Manufacturer]
   %Provider% = tap08qemu

[Models]
; Note 1. Replace the bogus *NM_OFDRIVER  "hw-id" with a real hardware PnP ID 
; Note 2. Optionally, add more NIC models supported by this file
;
; DisplayName        Section           hw-id
; -----------        -------           ------
;%DeviceDescription%=*yourdriver.ndi, *NM_OFDRIVER  


[tap08qemu]
   %DeviceDescription% = tap08qemu.ndi, *QEMU_TAP


then
devcon.exe install oemwin2k.inf *QEMU_TAP

works for me (don't ask which is the trick, as I don't know).

Just got tapinstall.exe from OpenVPN, which I think it is not redistributable as well :unsure: (but check it's status - I am not at all sure of this :ph34r: ).

And I can confirm that:
tapinstall.exe install oemwin2k.inf *QEMU_TAP

works allright with the modified .inf.

I'll see if I can find anythng else.

jaclaz

P.S.:
Found an interesting link:
http://forum.install...showtopic=15898
it seems like the most "plain" way is to create a DIFX package using DPINST, which is redistributable.

This post has been edited by jaclaz: 01 April 2010 - 10:01 AM


#8 User is offline   ravedadave 

  • Group: Members
  • Posts: 5
  • Joined: 31-March 10
  • OS:none specified
  • Country: Country Flag

Posted 01 April 2010 - 11:34 PM

View Postjaclaz, on 01 April 2010 - 09:28 AM, said:

Ok, found the problem with devcon.exe.

You need to change this:
;----------------------------------------------------------------
;                      Manufacturer + Product Section (Done)
;----------------------------------------------------------------
[Manufacturer]
   %Provider% = tap08qemu

[tap08qemu]
   %DeviceDescription% = tap08qemu.ndi, tap08qemu


to this:
[Manufacturer]
   %Provider% = tap08qemu

[Models]
; Note 1. Replace the bogus *NM_OFDRIVER  "hw-id" with a real hardware PnP ID 
; Note 2. Optionally, add more NIC models supported by this file
;
; DisplayName        Section           hw-id
; -----------        -------           ------
;%DeviceDescription%=*yourdriver.ndi, *NM_OFDRIVER  


[tap08qemu]
   %DeviceDescription% = tap08qemu.ndi, *QEMU_TAP


then
devcon.exe install oemwin2k.inf *QEMU_TAP

works for me (don't ask which is the trick, as I don't know).

Just got tapinstall.exe from OpenVPN, which I think it is not redistributable as well :unsure: (but check it's status - I am not at all sure of this :ph34r: ).

And I can confirm that:
tapinstall.exe install oemwin2k.inf *QEMU_TAP

works allright with the modified .inf.

I'll see if I can find anythng else.

jaclaz

P.S.:
Found an interesting link:
http://forum.install...showtopic=15898
it seems like the most "plain" way is to create a DIFX package using DPINST, which is redistributable.



Thanks for all your work!

I will look at this today, If I could just find a different solution to devcon.exe / tapinstall.exe it would be greate,

I have experimented with DPINST but had no luck so far.

Dave.

#9 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,420
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 02 April 2010 - 02:36 AM

Everything seems to lead that "something else" besides the .inf is needed when installing a "hardware" driver.
This could be the "right" solution:
http://nsis.sourcefo...InstDrv_plug-in
the NSIS installer is competely free. :thumbup

I am attaching a quickly put together thingy, that works for me, obviously it will need to be refined and polished, but it seems like working. :)

jaclaz

Attached File(s)



#10 User is offline   ravedadave 

  • Group: Members
  • Posts: 5
  • Joined: 31-March 10
  • OS:none specified
  • Country: Country Flag

Posted 02 April 2010 - 04:05 AM

View Postjaclaz, on 02 April 2010 - 02:36 AM, said:

Everything seems to lead that "something else" besides the .inf is needed when installing a "hardware" driver.
This could be the "right" solution:
http://nsis.sourcefo...InstDrv_plug-in
the NSIS installer is competely free. :thumbup

I am attaching a quickly put together thingy, that works for me, obviously it will need to be refined and polished, but it seems like working. :)

jaclaz



You are a * that works great!,

I can't thank you enough.

Dave.

#11 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,420
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 02 April 2010 - 05:11 AM

View Postravedadave, on 02 April 2010 - 04:05 AM, said:

You are a * that works great!

I am an asterisk? :w00t:

:P

View Postravedadave, on 02 April 2010 - 04:05 AM, said:

I can't thank you enough.

You don't need to :), just my small way to thank you for the great work you've done over the years with Qemu Manager. :thumbup

jaclaz

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy