Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / March 2008

Tip: Looking for answers? Try searching our database.

How to install/uninstall an inf driver?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
yxq - 01 Mar 2008 02:27 GMT
Hello,
I want to install/uninstall a driver(only inf file), this inf file does not
support right-click to install in explorer, it can only be installed from
Control Panel/Add Remove hardware.
Can anyone tell me how to install/uninstall in VB.NET?

Regards
Steven
Herfried K. Wagner [MVP] - 01 Mar 2008 03:41 GMT
"yxq" <gayxq@163.net> schrieb:
> I want to install/uninstall a driver(only inf file), this inf file does
> not support right-click to install in explorer, it can only be installed
> from Control Panel/Add Remove hardware.
> Can anyone tell me how to install/uninstall in VB.NET?

P/invoke:

Using SetupAPI Functions
<URL:http://msdn2.microsoft.com/en-us/library/ms791318.aspx>

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>

yxq - 01 Mar 2008 06:31 GMT
Thank you, could you please tell which function to install the inf file?

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at>
??????:elSId40eIHA.5996@TK2MSFTNGP04.phx.gbl...
> "yxq" <gayxq@163.net> schrieb:
>> I want to install/uninstall a driver(only inf file), this inf file does
[quoted text clipped - 6 lines]
> Using SetupAPI Functions
> <URL:http://msdn2.microsoft.com/en-us/library/ms791318.aspx>
Thorsten Doerfler - 01 Mar 2008 10:26 GMT
yxq schrieb:
> I want to install/uninstall a driver(only inf file), this inf file does not
> support right-click to install in explorer, it can only be installed from
> Control Panel/Add Remove hardware.
> Can anyone tell me how to install/uninstall in VB.NET?

Take a look at the Driver Package Installer:

Driver Package Installer (DPInst)
http://msdn2.microsoft.com/en-us/library/ms790308.aspx

You can configure it to run silently and check the results.

DPInst Command-Line Switches
http://msdn2.microsoft.com/en-us/library/ms790806.aspx

DPInst Return Code
http://msdn2.microsoft.com/en-us/library/ms791066.aspx

Thorsten Doerfler
Signature

Microsoft MVP Visual Basic

vb-hellfire visual basic faq  | vb-hellfire - einfach anders
http://vb-faq.de/             | http://www.vb-hellfire.de/

yxq - 01 Mar 2008 11:10 GMT
Thank you, but i do not want to use DPInst, only want to use the API
function, can you tell which API use?

"Thorsten Doerfler" <t.doerfler_nospam@bdsw.de>
??????:fqbeg2.12o.1@news.bdsw.de...
> yxq schrieb:
>> I want to install/uninstall a driver(only inf file), this inf file does
[quoted text clipped - 17 lines]
>
> Thorsten Doerfler
Thorsten Doerfler - 01 Mar 2008 17:32 GMT
yxq schrieb:
> Thank you, but i do not want to use DPInst

What's wrong with it?

> only want to use the API
> function, can you tell which API use?

Herfried gave you the entry point in the MSDN for information about
what APIs to use. With one API it's not done. If you don't want to
read the documentation, it would be easier for you, you take a tool
what encapsulates the required functions for you. The simplest API to
use is DriverPackageInstall of the DIFxAPI:

Perform a Default DIFxAPI Installation
http://msdn2.microsoft.com/en-us/library/ms790275.aspx

Thorsten Doerfler
Signature

Microsoft MVP Visual Basic

vb-hellfire visual basic faq  | vb-hellfire - einfach anders
http://vb-faq.de/             | http://www.vb-hellfire.de/


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.