• Adding a Registry entry
  • Copy files with batch installs.
  • Custom Network Card Install
  • Custom Network card Installation for older Legacy Devices
  • Appendix - Sections of Msbatch.inf
  • Msbatch.inf Issues The Install section of an INF




    Download 169 Kb.
    bet4/4
    Sana26.12.2019
    Hajmi169 Kb.
    #5160
    1   2   3   4

    Msbatch.inf Issues

    The Install section of an INF


    • Add STRING values

    • Add BINARY values

    • Add DWORD values

    • Delete a Registry value

    • Add/Delete Entry to Autoexec.bat

    • Copy Files

    • Update INI files

    To add custom entries into the registry (like RunOnce), an [Install] section in the Msbatch.inf file needs to be created.


    The [Install] section points to AddReg, CopyFile, UpdateINI, or any other sections that are needed to make specific customizations. The most common are the AddReg and CopyFiles sections, which are documented on the next two pages.

    Note: Adding devices to the Config.sys is not currently possible.
    The following is an example of the Install section of an Msbatch.ing


    [Install]

    ;; Install section

    AddReg=Update.REG

    ;; Modify Registry Values

    UpdateAutoBat=UPD.Auto.Bat

    ;; Modify Autoexec.bat values

    UpdateInis=UPD.Sys.ini

    ;; Modify the MSDOS.SYS







    [Update.REG]




    HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"Run the Mike Batch File",,"start c:\mike.bat"













    [UPD.Auto.Bat]




    CmdDelete=net

    ;;Deletes all net commands

    ;;i.e. net start, net init, ect



    CmdAdd=echo, “Admin added this entry”







    [UPD.Sys.ini]




    %30%\msdos.sys,Options,,”BootKeys=0”

    ;;Adds BootKeys to the Msdos.sys

    Adding a Registry entry


    [AddReg] Section

    RegRootKey, SubKey, Value-Name, Flag, Value



    Examples:

    1) Add a String value to the Registry to the RunOnce key to launch a bat file

    HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,”Run the Mike Batch File”,,”start c:\mike.bat"

    2) Add a DWORD value to the Registry

    HKLM,Software\Microsoft\Windows\CurrentVersion\Policies\Explorer,NoWindowsUpdate,0x10001,0
    3) Add a Binary value to the Registry

    HKLM,Software\Microsoft\Windows\CurrentVersion,RegDone,1,01,00,00,00


    Here is a definition for each example above for each portion of the entry.

    • RegRootKey =

    HKCR – HKEY_CLASSES_ROOT

    HKCU – HKEY_CURRENT_USER

    HKLM – HKEY_LOCAL_MACHINE

    HKU – HKEY_USERS




    • SubKey =

    1. Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup

    2. Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

    3. Software\Microsoft\Windows\CurrentVersion

    Identifies the subkey to set. Has the form key1\key2\key3....




    • Value-Name =

    1. “Run the Mike Batch File”

    2. NoWindowsUpdate

    3. RegDone

    Identifies the value name for the subkey. For string type, if the value-name parameter is left empty, the value of the subkey is set to the default value for that registry entry.




    • Flag =

    1. NULL

    2. 0x10001

    3. 1

    Optional. Establishes the value data type and the AddReg item action.

    Here is a list of acceptable Flag values:

    String - No value needed (quotes set data type)

    Dword - 0x10001

    Binary - 1


    • Value =

    1. “start c:\mike.bat”

    2. 0

    3. 01,00,00,00

    Value to set. This parameter may be either a string or a number in hexadecimal notation. At least two fields are required; however, one may be null.


    Note: Remember that registry entries are case dependant, so make sure the case of the AddReg entry matches the case that is currently in the registry.

    Copy files with batch installs.


    Be sure and use the SourceDisksNames and SourceDisksFiles sections to prevent errors during installation when using CopyFile= in the Msbatch.inf.
    Example:

    [Install]




    CopyFiles=My.comp.bmp

    ;;Tells the setup to copy the files in this section







    [My.comp.Bmp]

    ;;Defines the files names to copy

    cool.bmp




    company.bmp










    [DestinationDirs]

    ;;Set the directory in which to copy using the LDID of the directory, defined appendix C of the Windows 98 Resource Kit and the SDK and DDK.

    My.comp.Bmp = 10










    [SourceDisksNames]

    ;;Set the name of the disk which to copy from

    1=Disk_1_Desc,,0

    ;;Disk_1_Desc sets it to the setup directory.







    [SourceDisksFiles]

    ;;Specifies source file locations and sizes

    cool.bmp=1,bmp,0

    ;;Disk number defined in SourceDisksNames, sub

    company.bmp=1,bmp,0

    ;; directory, and size. 0 works as a NULL and

    ;; will work with all file sizes





    Custom Network Card Install


    Windows 98 does not ship with drivers for all brands and models of network adapters. In addition, some network card options are not enabled during setup by default. I/O address, interrupt, or other options may be set using a batch install. To manually set network card settings, perform the following steps:


    1. Add the line ‘IgnoreDetectedNetCard=1’ in the [Network] section of the inf




    1. Specify a network adapter (or multiple adapters) on the ‘netcards=’ line




    1. Add a section to the Msbatch.inf with the heading of the network adapter’s Device ID. The

    Device ID may be found in the network adapter’s inf file, as are the specific settings that can

    be configured during setup. To determine the Device ID of the network adapter, perform the

    following steps:


    1. To find the inf file used for a specific network adapter, from the Start Menu click Find, click Files or Folders, and type ‘*.inf’ in the Named box, and the name listed for the network adapter in Control Panel/Networks or Device Manager in containing text on the advanced tab.




    1. This will bring up all inf files containing the name of the network card. Open them up

    individually in Notepad, and search each file for a [Strings] section containing the Friendly

    name for the card.




    1. In the [Strings] section, the friendly name will be on the right side of an equal sign. On

    the left side of this equal sign will be the DeviceDesc for the particular hardware.


    1. Search the file for an entry starting with the DeviceDesc. The example listed below is for

    an Intel EtherExpress(TM) PRO/10+, and the entry in question is the line
    %*pnp8132.devicedesc%=*pnp8132.ndi, *pnp8132


    1. The Device ID for this network adapter is pnp8132, the last entry on this line. Find the .ndi section for this ID (*pnp8132.ndi in this case). Here may be found a list of AddReg settings performed when the card is installed. Part of this section will be used to set the network adapter’s parameters during setup.




    1. Copy the desired AddReg lines from the .ndi section to the adapter’s Device ID section in the Msbatch.inf and modify as appropriate for the installation. Some network adapter drivers, as in the example below, point to other areas for the AddReg lines. In the case of the example, add the desired AddReg lines contained in the sections [*PNP8132.ndi.reg] (not shown) and [epro.reg] and modify them appropriately.


    Note: The settings are typically located in the .ndi section of the inf file. Some drivers may vary, contact the driver’s hardware vendor if it is believed the network adapter uses a different format.
    Example of a Intel Ether Express Pro/10 (IRQ=5, I/O=300, and TP connector)

    NETPRO10.INF settings:

    [INTEL]

    %*pnp8132.devicedesc%=*pnp8132.ndi, *pnp8132

    %*INT1031.devicedesc%=*INT1031.ndi, *INT1031, *INT1030

    [strings]

    *pnp8132.devicedesc="Intel EtherExpress(TM) PRO/10+"

    *INT1031.devicedesc="Intel EtherExpress(TM) PRO/10+ (PnP Enabled)"

    [*PNP8132.ndi]

    AddReg=*pnp8132.ndi.reg,epro.reg

    LogConfig=*pnp8132.LogConfig

    [epro.reg]

    …..


    ; Resources

    HKR,,INTERRUPT,1,04,00,00,00

    HKR,,IOADDRESS,1,02,00,00,00

    ; Transceiver Type

    HKR,Ndi\params\TRANSCEIVER,ParamDesc,,"Transceiver Type"

    HKR,Ndi\params\TRANSCEIVER\enum,"0",,"Auto-Connector"

    HKR,Ndi\params\TRANSCEIVER\enum,"1",,"AUI Connector"

    HKR,Ndi\params\TRANSCEIVER\enum,"2",,"BNC Connector"

    HKR,Ndi\params\TRANSCEIVER\enum,"3",,"TPE Connector"
    MSBATCH.INF settings:

    [Network]

    IgnoreDetectedNetCards=1

    netcards= *pnp8132

    [*pnp8132]

    INTERRUPT=5

    IOADDRESS=300

    TRANSCEIVER="TPE Connector"


    Custom Network card Installation for older Legacy Devices


    Some network adapters may not function with the above information. An AddReg for the network adapter may be needed in many cases where the above does not work.


    [Network]




    Netcards=m_isa_FFFF

    ;;The identifier found in MyNic.inf







    [m_isa_FFFF]

    ;;Section for the card

    CardBrand=MyNicCompany

    ;;Copy this information out of the Inf

    INFFile=INF\MyNic.INF

    ;;file that is used for the Network Adapter

    AddReg=m_isa_FFFF.ndi.reg

    ;;In this case it was the MyNic.inf

    CardBrand=MyNicCompany




    INFFile=INF\MyNic.INF










    [isa_FFFF]

    ;; These settings are grabbed from the

    Interrupt=10

    ;; MyNic.inf’s [isa_FFFF.Params] section

    IOAddress=A20




    DMAChannel=5




    DataRate=16



    Appendix - Sections of Msbatch.inf


     Windows 98 Resource Kit; Appendix D, page(s): 1445-1482

    General System and Network Settings


    Section

    Command

    Description

    [Setup]




    Used to configure the SETUP options




    Express=0/1

    0 - Allow user input (Default).
    1- Don’t allow user input.




    InstallDir=""

    Location of Destination directory (%windir% is default)




    EBD=0/1

    0 - No Emergency Boot Disk
    1 - Create Emergency Book Disk (Default)




    ChangeDir=0/1

    0 - Don’t display Choose Install Directory.
    1 - Display the Choose Install Directory Dialog.




    OptionalComponents=0/1

    0 - Don’t use the Optional Components section.
    1 - Use Optional Components in Msbatch.inf




    CleanBoot=0/1

    0 = Do not force a clean installation, perform an upgrade instead.
    1 = Force a clean installation.





    PenWinWarning=0/1

    0 – Do not show warnings about unknown versions of Pen Windows.
    1 – Show warning. (Default)




    InstallType=0/1/2/3

    Select the type of Install
    0=Compact 1=Typical (Default),
    2=Portable 3= Custom




    TimeZone=""

    Pre-set the Time Zone. See the Windows 98 Resource Kit for sample




    Uninstall=0/1/5

    0 – No Uninstall or backup files.
    1 – Show Uninstall options for user choice (Default).
    5 - Force saving Uninstall data




    BackupDir=""

    Directory to store Uninstall data to




    NoDirWarn = 0/1

    0 = Warn me before overwriting an existing Windows installation directory
    1 = Overwrite the existing Windows installation directory without warning me





    NoPromptBoot=0/1

    0 - Don’t reboot the system for PCI and PnP enumeration.
    1 - Reboot the machine for PCI and PnP enumeration (Default).




    ShowEula=0/1

    0 – Don’t show EULA

    1 – (Default) Show EULA






    [System]




    Set CUSTOM hardware option




    MultiLanguage=

    English – support for English and Western Languages (Default)
    Greek – Adds additional support for Greek
    Cyrillic – Adds additional support for Cyrillic
    CE – Adds additional support for Eastern European language.




    (The following entries are based in INF section names:)




    Locale=INF_Definition

    Name found in Locale.inf




    PenWindows=INF_Definition

    Name found in Penwin.inf




    Power=INF_Definition

    Name found in Machine.inf or similar file (for advanced power management support)




    Display=INF_Definition


    Name found in Msdisp.inf.
    For example, from the description %SuperVGA.DriverDesc%=SVGA for Super VGA, the entry in Msbatch.inf would be display=svga.




    Keyboard=INF_Definition

    Keyboard.inf




    Mouse=INF_Definition

    Mouse.inf or similar file




    Tablet=INF_Definition

    Name Found in Pendrv.inf or similar file

    [NameAndOrg]

    Name and Organization section




    Name=""

    User’s Name




    Org=""

    Company Name




    Display=0/1

    0 - Don’t prompt for user input on Name and Org.
    1 – Prompt for user input (Default)

    [Network]




    Network Option Section




    ComputerName=""

    Computer Friendly name




    Workgroup=""

    Workgroup name




    Description=""

    Computer Description




    Display=0

    0 - Don’t prompt for Computer Name, Workgroup, etc.
    1 – Prompt for user input (Default)




    Clients=VREDIR, NWREDIR

    Clients to install




    Protocols=NETBEUI, NWLINK, MSTCP

    Protocols to install




    Services=VSERVER

    Server to install




    IgnoreDetectedNetCards=0

    0 - Do not ignore the detected network card (Default).
    1 - Ignore the detected network card.




    Security=

    share - share level security
    nwserver - user level security via NetWare server
    domain - user level security via NT domain.
    msserver - user level security via NT Workstation.


    PROTOCOL Sections


    Section

    Command

    Description

    [NWLINK]




    IPX/SPX protocol section




    FrameType=1/2/3/4

    1 – Ethernet_II

    2 – 802.2

    3 – 802.3

    4 – Auto





    NetBIOS=0/1

    0 - Disable NetBIOS over IPX/SPX

    1 – Enable NetBIOS over IPX/SPX












    [MSTCP]

    TCP/IP protocol section







    DHCP=0/1

    0 - Don’t enable DHCP.
    1 - Enable DHCP (Default)




    DNS=0/1

    0 - Disable DNS (Default).
    1 - Enable DNS.




    WINS=0/1/DHCP

    0 - Disable WINS
    1 - Enable WINS (Default)
    DHCP - Get WINS from DHCP server




    Hostname=

    TCP/IP Host Name

    Redirector Sections


    Section

    Command

    Description

    [NWREDIR]

    MS Client for NetWare Networks




    FirstNetDrive=:

    Login drive letter




    PreferredServer=

    Preferred NetWare Server




    ProcessLoginScript=0/1

    0 - Don’t Process NetWare Logon Script
    1 - Process Login Script (Default)

    [VREDIR]




    MS Client for MS Networks




    LogonDomain=""

    Validation domain name




    ValidatedLogon=0/1

    0 -Don’t validate logons (Default).
    1 - Validate logons.



    Optional Components


    Section

    Command

    Description

    [OptionalComponents]

    Optional Components to install




    “Accessibility Options"=0/1

    Don’t install the Accessibility options




    "Briefcase"=0/1

    0 - Don’t install the Briefcase.
    1 - Install the Briefcase.




    "Net Watcher"=0/1

    0 – Don’t install Netwatcher
    1 - Install Netwatcher




    "Online User's Guide"=0/1

    0 - Don’t install the Online User’s Guide
    1 - Install the Online User’s.




    "Paint"=0/1

    0 – Don’t install MSPaint
    1 - Install MSPaint..




    "Quick View"=0/1

    0 – Don’t install Quick View components
    1 - Install Quick View components.

    Adding Printers


    Section

    Command

    Description

    [Printers]




    Add the below printers




    Class Printer=<- Friendly name>

    Example would be Class Printer=HP LaserJet III,LPT1




    Page

    Download 169 Kb.
    1   2   3   4




    Download 169 Kb.

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    Msbatch.inf Issues The Install section of an INF

    Download 169 Kb.