Creating Auto Install INF file

15 pts.
Tags:
Drivers
Software installation
Windows installation
I am trying to install a driver using an automatic inf, currently we have to add new hardware/device/serial/comport have disk then select the driver to create the new virtual device.
I would like to install it via a command line batch file ( or right click and install ):
rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 myDevice.inf

Here is the current INF file. I do realize I need a [DefaultInstall] however cannot get it quite right.
[Version]
Signature="$CHICAGO$"
Class=VSerial
Provider=%MFGNAME%
; COM-Port
ClassGuid={4d36e978-e325-11ce-bfc1-08002be10318}
[Manufacturer]
%MFGNAME%=IBME
[IBME]
%vserial.DeviceDesc%=vserial.DriverInstall,vserial
;------------------------------------------------------------------------------
;  Class Install Section
;------------------------------------------------------------------------------
[ClassInstall]
AddReg=CanClassRegist
[ClassInstall32]
Addreg=CanClassRegist
[CanClassRegist]
HKR,,,0,%ClassName%
HKR,,Icon,,-23
;------------------------------------------------------------------------------
;  Installation Disk Information
;------------------------------------------------------------------------------
[SourceDisksFiles]
vserial.sys=1
[SourceDisksNames]
1=%InstDisk%,,,
;------------------------------------------------------------------------------
;  Windows 2000 Sections
;------------------------------------------------------------------------------
[vserial.DriverInstall.NT]
CopyFiles=vserial.Copy
AddReg=vserial.registry
[vserial.DriverInstall.NT.Services]
AddService=vserial,2,vserial.ServiceInstall
[vserial.ServiceInstall]
DisplayName=%vserial.DeviceDesc%
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%10%system32driversvserial.sys
;------------------------------------------------------------------------------
;  Windows 98 Sections
;------------------------------------------------------------------------------
[vserial.DriverInstall]
DriverVer=21/04/2010,7.00.5800.0
CopyFiles=vserial.Copy
AddReg=vserial.DriverAddReg,vserial.registry
[vserial.DriverAddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,vserial.sys
;------------------------------------------------------------------------------
;  Copy Files
;------------------------------------------------------------------------------
[DestinationDirs]
DefaultDestDir      = 11
vserial.Copy=10,system32drivers
[vserial.Copy]
vserial.sys,,,2
;------------------------------------------------------------------------------
;  Add Registry Entrys
;------------------------------------------------------------------------------
[vserial.registry]
HKLM,"SOFTWAREIBMEVSERIALDriversvserial",MaxChannels,0x10001,2
HKLM,"SOFTWAREIBMEVSERIALDriversvserial",DriverName,,vserial
HKLM,"SystemCurrentControlSetServicesvserialParameters","VirtualPort",0x10001,1
HKLM,"SystemCurrentControlSetServicesvserialParameters","ChannelCount",0x10001,2
;------------------------------------------------------------------------------
;  String Definitions
;------------------------------------------------------------------------------
[Strings]
MFGNAME="IBME"
ClassName="Virtual Hardware (IBME)"
InstDisk="IBME Hardware Drivers"
vserial.DeviceDesc="IBME Virtual Serial Port Driver"


Thanks for your help!

Answer Wiki

Thanks. We'll let you know when a new response is added.

You might want to be able to install the inf from a command-line. Here’s how:

 rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 file_name.inf

[list]file_name.inf = file to install
132 = flag to ask the user before rebooting
DefaultInstall = name of the section to install

Is this what you are talking about?

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Agritech
    Using the above INF ( as I don't understand the INF structure ) which section would be the main section to call? ( Win XP so I know its not the win98 section ;) )
    15 pointsBadges:
    report
  • Subhendu Sen
    Device information (INF) files are text files that provide information used by the Plug-and-Play mechanism in Windows 98/Me/2000/XP to install software that supports a given hardware device. U can use the DriverWizard to generate the INF file. U Should Create an INF file for that reasons : a) To stop the Windows Found New Hardware Wizard from popping up after each boot. b) To ensure that the operating system can initialize the PCI configuration registers on Windows 98/Me/2000/XP/Server 2003/Vista To Install / Creating an INF File : 1. Start > Run> CMD 2. wdreg -inf <address INF file> install (necessary to install wdreg on windows manually) It is also possible to install the INF file manually : 1. Found New Hardware Wizard 2. Add/Remove Hardware Wizard 3. Upgrade Device Driver Wizard It is possible, when manual installation methods above u need to point Windows to the location of the relevant INF file during the installation. Recommended that, using the wdreg utility to install the INF file automatically, instead of installing it manually. and win98, either u go for Add/Remove wizard or Upgrade device driver wizard.... Hope this info may help u !
    29,350 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following