|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- saved from url=(0056)file://Z:\sdktools\ddk\src\setup\inf\MultiOS\MultiOS.htm --> <HTML><HEAD><TITLE>Sample INF File Readme</TITLE> <META http-equiv=Content-Type content="text/html; charset=windows-1252"> <META content="MSHTML 6.00.3586.0" name=GENERATOR></HEAD> <BODY link=#0000ff><FONT face=Verdana size=5> <H2>MultiOS.INF - SAMPLE INF FILE</H2></FONT><FONT face=Verdana size=2> <P><SPAN style="FONT-SIZE: 10pt; COLOR: #ff0000; FONT-FAMILY: Arial">[This is preliminary documentation and subject to change.]</SPAN></P> <H3>SUMMARY</H3> <P><B><I>MultiOS.inf</I></B> is a sample INF file that illustrates the general structure for using a single INF file to install different printer drivers on Windows� Server 2003, Windows� XP, Windows� 2000, and Windows� 9x (encompassing Windows 98, Windows 98 Second Edition, and Windows Millennium).</P>
<P>The sample includes specific INF constructs to demonstrate the following concepts:</P> <BLOCKQUOTE> <P>Platform extensions, including consistent usage throughout the INF file.</P></BLOCKQUOTE> <BLOCKQUOTE> <P>Installation on multiple platforms from one INF file.</P></BLOCKQUOTE> <BLOCKQUOTE> <P>Installation of different local language versions of binaries from one INF file.</P></BLOCKQUOTE> <P>Review this document carefully, taking careful note of the sample's limitations.</P> <H3>USING THE SAMPLE</H3> <P>In addition to the contents of this document, the sample INF file contains explanatory comments throughout.</P> <P>Users of this sample INF file will need to add their own information, including file names, registry information, and company information in the <I>Strings</I> section, and adding additional <I>Strings</I> sections for additional local language support and so forth.</P> <P>The sample INF file includes several <I>DDInstall</I>-related sections that are used on more than one Windows platform. These sections are:</P> <BLOCKQUOTE> <P><I>CommonXPAddReg</I>, <I>WinXPCopyDriver</I> and <I>WinXPCopyDlls</I> - common sections for installing on both platforms (x86 and ia64) for Windows XP only.</P></BLOCKQUOTE> <BLOCKQUOTE> <P><I>WinXPServiceInstallSection</I> and <I>WinXPServiceAddReg</I> - common service installation sections for installing on both platforms (x86 and ia64) for Windows XP only.</P></BLOCKQUOTE> <BLOCKQUOTE> <P><I>CommonAddReg</I> - common registry section for installing on all supported platforms - Windows 9x/ME, Windows 2000, and Windows XP.</P></BLOCKQUOTE> <P>When possible, the use of common sections reduces the likelihood of introducing errors in the completed INF file, while reducing the size and complexity of the INF file as well.</P> <P>This sample INF file is saved as plain ASCII text (using Windows Notepad with the default ANSI encoding). As part of customizing this INF file for installing a specific device, you may need to save the INF file with Unicode encoding. Unicode allows the INF file writer the flexibility to mix locales that use different ANSI codepages. To save any text file with Unicode encoding using Windows Notepad, follow these steps:</P> <LI>Click the Notepad <I>File</I> Menu. <LI>Select <I>Save As</I>. <LI>Click the <I>Encoding</I> drop-down list, and select the preferred Unicode encoding. <LI>Click <I>Save</I> to save the file. <P>Microsoft provides two useful tools for checking INF file structure and syntax:</P> <BLOCKQUOTE> <P><I>ChkINF</I> is a Perl script that checks the structure and syntax of Microsoft� Windows� 2000, Windows� XP and Windows� Server 2003 driver INF files. Results are presented in HTML format, and include a list of the errors and warnings detected in each INF file, with each error and warning shown next to the errant INF file entry. ChkINF is available in this DDK in the <I>tools\chkinf</I> directory.</P></BLOCKQUOTE> <BLOCKQUOTE> <P><I>Signability</I> is a tool for ensuring that a driver package can be properly signed after it passes Designed for Windows Logo testing. Signability is available for download from the Hardware Compatibility Test Kit Web site at <A href="http://www.microsoft.com/hwtest/testkits">http://www.microsoft.com/hwtest/testkits</A>.</P></BLOCKQUOTE> <P>Both of these tools are included in the Hardware Compatibility Test Kits used for Designed for Windows Logo testing.</P> <H4>Suggested Media Layout</H4> <P>Many devices are distributed with accompanying media (typically a CD) containing drivers targeted at multiple local languages and multiple versions of Windows. The table below presents one possible structure for organizing such media, so that multiple languages can be supported on Windows 9x, Windows NT 4.0, Windows 2000, Windows XP and Windows Server 2003.</P></FONT><FONT face=Courier size=2> <TABLE cellSpacing=20 cellPadding=0 border=0> <TBODY> <TR> <TD><U>Directory</U></TD> <TD><U>Containing INF File<U></U></U></TD> <TD><U>Notes<U></U></U></TD></TR> <TR> <TD>\ (root directory)</TD> <TD>NT4.inf</TD> <TD>Unsigned Unicode INF file for Windows NT 4.0 only</TD></TR> <TR> <TD>\Windows</TD> <TD>MultiOS.inf</TD> <TD>Signed Unicode INF file for Windows Server 2003, Windows 2000 and Windows XP</TD></TR> <TR> <TD>\Win9xeng</TD> <TD>Win9xEng.inf</TD> <TD>Signed English language INF file for Windows 9x only</TD></TR> <TR> <TD>\Win9xFra</TD> <TD>Win9xFra.inf</TD> <TD>Signed French language INF file for Windows 9x only</TD></TR> <TR> <TD>\Win9xGer</TD> <TD>Win9xGer.inf</TD> <TD>Signed German language INF file for Windows 9x only</TD></TR></TBODY></TABLE><FONT face=Verdana size=2> <H5>Some notes about this Suggested Media Layout</H5> <BLOCKQUOTE> <P>Windows 9x does not recognize or handle localized <I>Strings.LanguageID</I> sections, necessitating the use of individual INF files for each supported locale.</P></BLOCKQUOTE> <BLOCKQUOTE> <P>Windows 9x does not recognize INF files stored with Unicode encoding, and will ignore any Unicode INF files it might encounter. In this media layout, the INF files targeted at non-Windows 9x platforms are saved with Unicode encoding, so Windows 9x will not see them. If this layout were presented to a Windows 9x user, the user would see a list that included only the Windows 9x INF files, and none of the Unicode INF files targeted at Windows NT 4.0, Windows 2000 or Windows XP or Windows Server 2003.</P></BLOCKQUOTE> <BLOCKQUOTE> <P>Because there is no way to differentiate a Windows NT 4.0 INF file from a joint Windows 2000/Windows XP/Windows Server 2003 INF file, a separate INF file should be provided for Windows NT 4.0 support. In the table above, the Windows NT 4.0 INF file is placed in the root directory of the media for easy discovery by Windows NT 4.0 users.</P></BLOCKQUOTE> <BLOCKQUOTE> <P>Windows NT 4.0 does not recognize driver signatures, so the INF file for Windows NT 4.0 can be unsigned. Even though this file will appear as a valid INF file to Windows 2000, Windows XP and Windows Server 2003, if the INF file (MultiOS.inf in the table above) targeted at these versions of Windows is signed, both of these versions of Windows will choose the signed INF file in preference to the unsigned INF file. See the "How Setup Selects Drivers" topic in the Windows DDK Documentation for additional details.</P></BLOCKQUOTE> <H4>Warnings Generated by the ChkINF Tool</H4> <P>The ChkINF tool reports zero errors and the following four warnings when executed on this sample INF file:</P><FONT color=blue> <LI><A>Line 95</A>: (W22.1.2208) NT-specific section(s) found. Ignoring general section. <LI><A>Line 95</A>: (W22.1.2083) Section [DRIVERINSTALL] not referenced <LI><A>Line 101</A>: (W22.1.2083) Section [WIN9XADDREG] not referenced <LI><A>Line 104</A>: (W22.1.2083) Section [WIN9XCOPYFILES] not referenced </FONT><BR> <P>The first warning, "NT-specific section(s) found. Ignoring general section", indicates that this INF file contains installation sections that are decorated with platform extensions (<I>.NTx86</I> and <I>.NTia64</I>), as well as plain, undecorated installation sections ("DriverInstall" for example). Since ChkINF detected the decorated sections, it will not check any undecorated <I>DDInstall</I> sections it finds.</P> <P>The other three warnings are related to the first. While ChkINF will not check undecorated <I>DDInstall</I> sections, it will report any unreferenced sections as an aid to INF developers. These three warnings are simply stating that these sections are not referenced anywhere else in the INF file. (Actually, the second and third unreferenced sections, "Win9xAddReg" and "Win9xCopyFiles", are referenced in the first unreferenced section, "DriverInstall". Due to presence of decorated <I>DDInstall</I> sections, ChkINF will not check this undecorated <I>DDInstall</I> section, and it and the two sections it references are thereby reported as unreferenced.)</P> <H3>LIMITATIONS</H3> <P>This INF file is incomplete. Users of this sample will need to add their own information, including file names, registry information, and company information in the <I>Strings</I> section and so forth.</P> <P>Note that Windows 9x does not recognize or handle localized <I>Strings.LanguageID</I> sections, and so the localization techniques exemplified in the sample INF file cannot be used on Windows 9x. See the section entitled <I>Suggested Media Layout</I> above for suggestions on handling Windows 9x. The installation sections for Windows 9x that are present in the INF file are included for illustrative purposes only.</P> <P>As discussed in <I>Warnings Generated by the ChkINF Tool</I> above, the ChkINF tool reports zero errors and four warnings when executed on the sample INF file. These four warnings represent known issues with the INF file, and can be readily explained. Use of the ChkINF tool is strongly recommended when writing INF files.</P> <P>As noted in <I>Using the Sample</I> above, this sample INF file is saved as plain ASCII text (saved from Windows Notepad with the default ANSI encoding).</P> <H3>CODE TOUR</H3> <H4>File Manifest</H4></FONT><FONT face=Courier size=3> <TABLE cellSpacing=10 cellPadding=0 border=0> <TBODY> <TR> <TD><U>File</U></TD> <TD><U>Description<U></U></U></TD></TR> <TR> <TD><I>MultiOS.htm</I></TD> <TD>Readme for MultiOS.inf (this file).</TD></TR> <TR> <TD><I>MultiOS.inf</I></TD> <TD>Sample multi-platform, multi-language INF file.</TD></TR></TBODY></TABLE><FONT face=Verdana size=2> <H3>FEEDBACK</H3> <P>We welcome your comments, problem reports and wish-list requests. Please submit them by pointing your Internet browser to <A href="http://www.microsoft.com/ddk">http://www.microsoft.com/ddk</A>. </FONT></P> <P align=center><FONT face=Verdana size=2><A href="file:///Z:/sdktools/ddk/src/setup/inf/MultiOS/MultiOS.htm#top">Top of page</A> </P></FONT> <TABLE cellSpacing=0 width=624 border=0> <TBODY> <TR> <TD vAlign=center bgColor=#00ffff height=2></TD></TR></TBODY></TABLE><FONT face="MS Sans Serif" size=1> <P>� Microsoft Corporation 2001-2003</FONT><FONT face=Verdana size=2> </P></FONT></FONT> <UL></UL></LI></FONT></BODY></HTML>
|