🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #6524

Re: Installing printer drivers from within an application using the .INF file

#6524
From: Terry
Date: Fri, 06 May 2005 02:05
92 lines
2934 bytes
Here is what I used, but it doesn't seem to do anything. I don't see the 
.dll files copied to where they would normally be.

  ShellExecute(NULL, "Install", "d:\\test\\hp201ip5.inf", NULL, NULL, 
SW_SHOWNORMAL);

All of the install files are in the d:\test directory.  However, the INF 
file has a section called SourceDisksName.x86, parameter 1 = %DiskID1%,,,""

How do I pass it the parameter for DiskID1 or do I need to?

Here is the .INF file.

--------------------------------------------------------------------
; Version section
[Version]
Signature="$Windows NT$"
Provider=HP
layoutfile=HP201Ip5.inf
ClassGUID={4D36E979-E325-11CE-BFC1-08002BE10318}
Class=Printer
catalogfile=HP201Ip5.cat
driverver=03/01/2002,4.3.2.201


; Manufacturer section
[Manufacturer]
HP=HPLaserPrinter

; Model sections.
[HPLaserPrinter]
%Printer%=HPBF201I.PMD,lptenum\hewlett-packardhp_la848d

; Installer Sections
[HPBF201I.PMD]
DataSection=HPBF201I_DATA
CopyFiles=HPBF201I_FILES,LANGMON_FILES
DataFile=HPBF201I.PMD

; Data Sections
[HPBF201I_DATA]
DriverFile=HPBF201G.DLL
ConfigFile=HPBF201E.DLL
HelpFile=HPBF201I.HLP
LanguageMonitor=%HP_LANG_MONITOR%

; Copy Sections
[HPBF201I_FILES]
HPBF201E.DLL
HPBF201F.DLL
HPBF201G.DLL
HPBF201H.DLL
HPBF201I.PMD
HPBF201I.DLL
HPBF201I.HLP
HPBF201J.DLL
HPBF201K.DLL
HPBAFD32.DLL
HPBFTM32.DLL

[LANGMON_FILES]
HPDCMON.DLL

[DestinationDirs]
HPBF201I_FILES=66000
LANGMON_FILES=66000
DefaultDestDir=66000

; Localizable Strings
[Strings]
Printer="HP LaserJet 1100"
DiskID1="HP LaserJet 1100 Printer Driver Disk"
HP_LANG_MONITOR="HP LaserJet 5 Language Monitor,HPDCMON.DLL"


; Sourcedisks section
[SourceDisksNames.x86]
1 = %DiskId1%,,,""

[SourceDisksFiles.x86]
HPBF201E.DLL=1
HPBF201F.DLL=1
HPBF201G.DLL=1
HPBF201H.DLL=1
HPBF201I.PMD=1
HPBF201I.DLL=1
HPBF201I.HLP=1
HPBF201J.DLL=1
HPBF201K.DLL=1
HPDCMON.DLL=1
HPBAFD32.DLL=1
HPBFTM32.DLL=1
Technical Details
Message-ID: <427ad0de$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <427a6de2$2@newsgroups.borland.com> <427a7c38$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,6289a58596aed8d8
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Thu, 05 May 2005 19:05:19 -0700
From: Terry <unknown@unknown.com>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Installing printer drivers from within an application using the
 .INF file
References: <427a6de2$2@newsgroups.borland.com> <427a7c38$1@newsgroups.borland.com>
In-Reply-To: <427a7c38$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 70.176.229.107
Message-ID: <427ad0de$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1115345118 70.176.229.107 (5 May 2005 19:05:18 -0700)
Lines: 92
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail