HOWTO: Download a Text File Using IE Component DownloadID: Q185373
|
A text file can be downloaded in connection with an ActiveX control or by itself using the Microsoft Internet Explorer component download facility.
Downloading a text file using the component download facility requires a
unique Class ID (GUID) that can be a Class ID associated with a dummy
ActiveX control or a dummy GUID generated specifically for the purpose of
downloading a text file by itself.
Downloading a text file in association with a dummy ActiveX control (a
control whose only purpose is to provide a versioning mechanism for
downloading a text file) follows the same principles as downloading a
Readme.txt file along with any functional ActiveX control.
When using a dummy ActiveX control, the control would:
[Add.Code]
... (other files)
Myfile.txt=Myfile.txt
NOTE: Myfile.txt is the name of the text file you want to download.
[Myfile.txt]
file=thiscab
FileVersion=
DestDir=10
RegisterServer=no
The DestDir=10 entry causes the text file to be downloaded to the main
Windows directory (Windows 95 and Windows NT). This is necessary so that
the file is visible in the file explorer window. Otherwise, if DestDir=
is used (no value after the "="), and Internet Explorer 4.0 or later is
installed, the text file will not be visible to users in the Downloaded
Program Files directory except when viewed in a DOS command window.
; INF file for text file download
[Add.Code]
Mytext.txt=Mytext.txt
[Mytext.txt]
file=thiscab
FileVersion=
DestDir=10
RegisterServer=no
Myfile.txt is the name of the text file you want to download.
cabarc n mytext.cab mytext.inf mytext.txt
Use the appropriate names that you chose for your .inf and text files,
choosing a relevant name for the .cab file.
<HTML>
<HEAD>
<TITLE>Text file download sample</title>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
Before text cab object-->
<OBJECT ID="MyText" width=0 height=0
CLASSID="CLSID:7DA8B621-FA5A-11d0-B4D7-00AA00B92AB3"
CODEBASE="mytext.cab">
</OBJECT>
<--after text cab object
</BODY>
</HTML>
For more information, please see the MSDN Web Workshop:
http://msdn.microsoft.com/workshop/default.asp
Q169609 HOWTO: Digitally Sign Your Visual Basic 5.0 Internet Application
Additional query words:
Keywords : kbIE300 kbIE301 kbIE400 kbIE401 kbIE302 kbIE500 kbDSupport
Version : WINDOWS:3.0,3.01,3.02,4.0,4.01,5.0
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: July 22, 1999