Thursday, February 21, 2008

Copying Additional Files during the Installation

Copying Additional Files during the Installation

While installing Windows95, you have the ability to copy in additional files.
These can be copied to any directory you choose.
A sample will be given at the end of this section.

There are five basic steps you need to go through when editing the MSBATCH.INF.

1. Letting the installation know you want to copy additional files.
2. Specifying what files to copy.
3. Specifying the destination for the files.
4. Specifying the source disk number for the files.
5. Specifying the source location for the files.

1. In the [Install] section, add Copyfiles=file-list-section
The file-list-section should reference the one in #2.

The format is:
[Install]
Copyfiles=file-list-section

2. Create a [file-list-section] using the same name you did in step #1. This is simply a list of all the files you want to copy, one file per line.

The format is:
[file-list-section]
file1
file2
file3...

3. The next step is to define where you want the files to be copied. You need to create or add to the [DestinationDirs] section.

The format is:
[DestinationDirs]
file-selection-list, ldid[,subdir]

where ldid is the Local Disk Identifier
The ldid is a number which references a particular directory on your hard drive.

Common ones would be:
10 - Windows Directory
11 - System Directory
13 - Command Directory
30 - Root of Boot Drive
A full listing is given on page 1167 in the Windows95 Resource Kit.

A feature is the ability to copy to any directory of your choice, as long as it is created before you start the installation.
For the destination directory's location, select 30,new_directory . This will copy the files to a directory below the root of the boot drive.

4. The next step is to specify a Source Disk Name. This is simply in preparation for the next step.

The format is:
[SourceDisksNames]
disk-number= description,label,serial-number

The disk-number must match the one in #5

5. The last step is to identify each of the source disk files and location. These can be from a current windows directory or a new one you created.

The format is:
[SourceDisksFiles]
filename=source-disk-names,subdirectory,filesize

For example, if you have a new directory under your current source called MYFILES , you would use: [SourceDisksFiles]
filename=22,myfiles,size

The following example would copy the files listed under [MyFiles] to the Windows directory and the files listed under [NewFiles] to a C:\TEST directory.

The files for MyFiles would be in a MyFiles directory below the main Windows95 source files. The files for NewFiles would be in a directory NewFiles directory below the main Windows95 source files.
The file sizes of 1024, 2048 and 3096 are just for examples. [Install]
Copyfiles=MyFiles,NewFiles

[MyFiles]
MyFile_1
MyFile_2
MyFile_3

[NewFiles]
NewFile_1
NewFile_2

[DestinationDirs]
MyFiles=10
NewFiles=30,test

[SourceDisksNames]
33,"MyFilesSource",MyFiles,0
44,"MyNewFilesSource",NewFile,0

[SourceDisksFiles]
MyFile_1=33,,1024
MyFile_2=33,,2048
MyFile_3=33,,3096
NewFile_1=44,,1024
NewFile_2=44,,2048

No comments: