I have to prepare .msi install file. I have to put some drivers into system.
Drivers has .inf files. I tried to prepare .bat file with sth like this:
%SystemRoot%\System32\rundll32.exe setupapi,InstallHinfSection
DefaultInstall 132 ftdibus.inf
but it doesn't work. I got an error: Installation failed
What's wrong with that and how to do it?
thanks in advance
P.
--
Stefan Krueger
Microsoft Windows Installer MVP
Please post your questions in the newsgroup or vist one of these web sites:
Windows Installer FAQ
http://www.msifaq.com - http://www.msifaq.de
InstallSite - Resources for Setup Developers
http://www.installsite.org
http://www.installsite.de (GERMAN)
"siedem" <psio...@aiut.com.pl> schrieb im Newsbeitrag
news:ON8fkiT1...@TK2MSFTNGP11.phx.gbl...
First, use SetupCopyOEMInfA to copy the INF file into windows.
Then, use SetupOpenInfFileA to open the file.
Use the handle in a call to SetupInstallFromInfSection, and tell it to
install SPINST_ALL.
If you have any services in the INF file, use
SetupInstallServicesFromInfSection to install them.
and then use SetupDiInstallClass (if you have any custom device classes to
install. If you are using a standard device class, the class installer for
that device will do the job for you). Let me know if you are installing a
device with a new class, and I can go through the installation methods for a
class installer.
I have tested this with W2K and WXP. It should also work for W2K3, but
hasn't been thoroughly tested yet.
--
Darin Rousseau
DarinR...@fssinet.net
Fundamental Software Solutions Inc
http://www.fssinet.net/
"siedem" <psio...@aiut.com.pl> wrote in message
news:ON8fkiT1...@TK2MSFTNGP11.phx.gbl...
and it works - i don't get any error, but i have still problem,
this inf isn't full - i think - and it doesn't execute proper actions like
copying files and writting to registry...
mayby i need any special section in .inf file to do this actions? inf looks
like this:
; FTDIBUS.INF
; Copyright (c) 2000-2003 FTDI Ltd.
[Version]
signature="$CHICAGO$"
Class=USB
ClassGUID={36fc9e60-c465-11cf-8056-444553540000}
Provider=%FTDI%
CatalogFile=ftdibus.cat
DriverVer=02/25/2003,1.00.2115
[SourceDisksNames]
1=%DriversDisk%,,,
[SourceDisksFiles]
ftcomms.vxd = 1
ftserial.sys = 1
ftsenum.vxd = 1
ftsenum.sys = 1
ftsermou.vxd = 1
ftserui.dll = 1
ftdibus.sys = 1
ftdiunin.exe = 1
ftdiunin.ini = 1
ftdiun2k.ini = 1
[DestinationDirs]
FtdiBus.Copy1 = 11
FtdiBus.Copy2 = 17
FtdiBus.NT.Copy = 10,system32\drivers
FtdiBus.NT.Copy2 = 11
[Manufacturer]
%Ftdi%=FtdiHw
[FtdiHw]
%USB\VID_0403&PID_8372.DeviceDesc%=FtdiBus,USB\VID_0403&PID_8372
%USB\VID_0403&PID_6001.DeviceDesc%=FtdiBus,USB\VID_0403&PID_6001
[ControlFlags]
ExcludeFromSelect=USB\VID_0403&PID_8372
ExcludeFromSelect=USB\VID_0403&PID_6001
[FtdiBus]
CopyFiles=FtdiBus.Copy1,FtdiBus.Copy2
AddReg=FtdiBus.AddReg, FtdiBusUnInst.Reg
RemoveDevice=FtdiBus.RemDev
[FtdiBus.HW]
AddReg=FtdiBus.AddReg.HW
[FtdiBus.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,ftserial.sys
[FtdiBus.AddReg.HW]
HKR,,"UpperFilters",0x00010000,"ftsenum.sys"
[FtdiBus.Copy1]
ftcomms.vxd
ftsenum.vxd
ftsermou.vxd
ftserial.sys
ftsenum.sys
ftserui.dll
ftdiunin.exe
ftdiunin.ini
[FtdiBus.Copy2]
ftdibus.inf
ftdiport.inf
ftsermou.inf
[FtdiBus.RemDev]
DelFiles=FtdiBus.Delfiles
DELKEY=HKLM,%WINUN%\FTDICOMM
[FtdiBusUnInst.Reg]
HKLM,%WINUN%,"FTDICOMM"
HKLM,%WINUN%\FTDICOMM , "UninstallString",,"%11%\ftdiunin.exe
%11%\ftdiunin.ini"
HKLM,%WINUN%\FTDICOMM , "DisplayName",,"FTDI USB-to-Serial Converter
Drivers"
[FtdiBus.DelFiles]
FTCOMMS.VXD
ftsenum.vxd
ftsermou.vxd
FTSERIAL.SYS
FTPORTS.INF
FTDICOM.INF
ftdibus.inf
ftdiport.inf
ftsenum.sys
ftserui.dll
ftdiunin.exe
ftdiunin.ini
;---------------------------------------------------------------;
; For Win2000 ...
;
[FtdiBus.NT]
CopyFiles=FtdiBus.NT.Copy,FtdiBus.NT.Copy2
AddReg=FtdiBus.NT.AddReg,FtdiBusUnInst.NT.Reg
[FtdiBus.NT.Services]
AddService = FTDIBUS, 0x00000002, FtdiBus_AddService
[FtdiBus_AddService]
DisplayName = %FtdiBus.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %10%\system32\drivers\ftdibus.sys
LoadOrderGroup = Base
AddReg = FtdiBus_AddService.AddReg
[FtdiBus.NT.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,ftdibus.sys
[FtdiBus_AddService.AddReg]
HKR,Parameters,"MaximumTransferSize",0x10001,4096
HKR,Parameters,"DebugLevel",0x10001,2
[FtdiBus.NT.Copy]
ftdibus.sys
[FtdiBus.NT.Copy2]
ftdiunin.exe
ftdiun2k.ini
[FtdiBusUnInst.NT.Reg]
HKLM,%WINUN%,"FTDICOMM"
HKLM,%WINUN%\FTDICOMM , "UninstallString",,"%11%\ftdiunin.exe
%11%\ftdiun2k.ini"
HKLM,%WINUN%\FTDICOMM , "DisplayName",,"FTDI USB Serial Converter Drivers"
;---------------------------------------------------------------;
[Strings]
Ftdi="FTDI"
DriversDisk="FTDI USB Drivers Disk"
USB\VID_0403&PID_8372.DeviceDesc="USB Serial Converter"
USB\VID_0403&PID_6001.DeviceDesc="USB High Speed Serial Converter"
WINUN="Software\Microsoft\Windows\CurrentVersion\Uninstall"
FtdiBus.SvcDesc="USB Serial Converter Driver"
"Stefan Krueger [MVP]" <ms0...@nwsgrp.REMOVETHIS.installsite.net> wrote in
message news:u2sCnXV1...@tk2msftngp13.phx.gbl...
"Darin Rousseau" <DSR.N...@fssinet.net> wrote in message
news:%233lkmTY...@TK2MSFTNGP09.phx.gbl...
You could use the method that Darin has suggested. For plug&play devices it
may be sufficient to copy the .inf file to the INF folder _before_
connecting the device. Windows will then automatically install the driver
when you connect the device.
--
Stefan Krueger
Microsoft Windows Installer MVP
Please post your questions in the newsgroup or vist one of these web sites:
Windows Installer FAQ
http://www.msifaq.com - http://www.msifaq.de
InstallSite - Resources for Setup Developers
http://www.installsite.org
http://www.installsite.de (GERMAN)
"siedem" <psio...@aiut.com.pl> schrieb im Newsbeitrag
news:uQkiMob1...@TK2MSFTNGP12.phx.gbl...
I know that many INF's can be installed with shell commands, but
unfortunately my customers' drivers or INF's never seemed to work with a
single simple call like that. (no matter how much I prayed to the PNP gods)
Although I haven't worked on USB devices, your INF has the same components
as my class driver, with the exception of the Windows 9x drivers. The
compatibility for that platform would have to be checked against the
SetupDDI functions, but I think a corresponding call is available for each
(they are all pretty standard)
PS, any thought about contracting out the job?
--
Darin Rousseau
DarinR...@fssinet.net
Fundamental Software Solutions Inc
http://www.fssinet.net/
"siedem" <psio...@aiut.com.pl> wrote in message
news:Oy423vb1...@TK2MSFTNGP09.phx.gbl...
"Darin Rousseau" <DSR.N...@fssinet.net> wrote in message
news:%23VFM8So...@TK2MSFTNGP10.phx.gbl...
devcon INSTALL <inf file> <device id>
The source code is available for devcon in the DDK, so you can tailor that
as required for an MSI custom action. Unfortunately that doesn't really
solve the problem with a rundll command or other shell command as you
requested earlier.
--
Darin Rousseau
DarinR...@fssinet.net
Fundamental Software Solutions Inc
http://www.fssinet.net/
"siedem" <psio...@aiut.com.pl> wrote in message
news:%2308FuTs...@TK2MSFTNGP11.phx.gbl...
"Darin Rousseau" <DSR.N...@fssinet.net> wrote in message
news:uC$bsxu1D...@TK2MSFTNGP10.phx.gbl...
"siedem" <psio...@aiut.com.pl> wrote in message
news:%238ovXoO...@tk2msftngp13.phx.gbl...
"Darin Rousseau" <DSR.N...@fssinet.net> wrote in message
news:%233lkmTY...@TK2MSFTNGP09.phx.gbl...