SoFunction
Updated on 2025-04-08

Oscdimg command line options use

Oscdimg command line options
Updated: May 2009
Applied to: Windows 7
Oscdimg is a command line tool for creating custom 32-bit or 64-bit versions of Windows(R) PE image files (.iso). The .iso file can then be burned to a CD-ROM or DVD-ROM. Oscdimg supports ISO 9660, Joliet, and Universal Disk Format (UFD) file systems.
Remark
To create a bootable CD-ROM, you must use CD burning software, which can unpack and burn the .iso file to the CD-ROM. Copying only .iso files to CD-ROM will not work.
The Oscdimg tool is not supported on Itanium-based computers running Windows Server 2003.

Oscdimg command line options
The following command line options are available for Oscdimg.
oscdimg [options] SourceLocationTargetFile
Option Description
-a
Displays an allocation summary of files and directories.
-b location
Specifies the location of the El Torito boot sector file. No spaces can be used, for example, -bC:\Directory\
-c
Specifies to use the ANSI file name instead of the OEM file name.
-d
Do not force convert lowercase letter file names to uppercase letters.
-e
This option disables floppy disk simulation in the El Torito catalog. This option can only be used with a single startup item image and cannot be used with any multi-start item switches.
-g
Use Universal Coordinated Time (UCT) instead of local time for all files.
-h
Includes hidden files and directories.
-j1
Encode the Joliet Unicode filename and generate a DOS-compatible 8.3 filename in the ISO 9660 namespace. These file names can be read by Joliet systems or traditional ISO 9660 systems, but Oscdimg may change some file names in the ISO 9660 namespace to comply with DOS 8.3 and/or ISO 9660 naming restrictions.
When using the -j1, -j2, or -js options, the -d, -n, and -nt options are not applied and cannot be used.
-j2
Encode the Joliet Unicode file name without a standard ISO 9660 name. (Requests the Joliet operating system to read files from the CD-ROM.)
When using the -j1, -j2, or -js options, the -d, -n, and -nt options are not applied and cannot be used.
-js
Overwrite the default text file for the -j2 option, for example, -jsc:\
When using the -j1, -j2, or -js options, the -d, -n, and -nt options are not applied and cannot be used.
-k
Even if it fails to open some source files, the image is still created.
-l labelname
Specify the volume label. Spaces cannot be used between l and labelname.
For example, -lMYLABEL
-m
Ignore the maximum size limit for the image.
-maxsize: limit
The default maximum size of the overwrite image. The default size is a CD of 74 minutes, unless a UDF is used, in which case the default value is no maximum size. The limit value is specified in megabytes (MB). For example, -maxsize:4096 can limit the image to 4096 MB.
The -m option cannot be used with this option.
-n
Allow long file names.
-nt
Allows long file names compatible with Windows NT 3.51.
-o
Optimize storage by comparing files using the MD5 hash algorithm to encode duplicate files only once.
-oc
Optimize storage by encoding duplicate files only once using binary comparisons of each file. This option is slower than -o.
-oi
Optimize storage by encoding duplicate files only once. When comparing files, ignore the diamond compression timestamp.
-os
Optimize storage by encoding duplicate files only once. Show duplicate files when creating an image.
-ois
Optimize storage by encoding duplicate files only once. When comparing files, ignore the diamond compression timestamp. Show duplicate files when creating an image.
-p
Specifies the value to use for the platform ID in the El Torito catalog. The default value is 0x00, indicating the x86 platform. This option can only be used with a single startup item image and cannot be used with any multi-start item switches.
-q
Scan only the source files; this command does not create an image.
-t mm/dd/yyyy,hh:mm:ss
Specify a timestamp for all files and directories. Do not use any spaces. Use US date format and 24-hour time. Any separator can be used between projects.
For example,
Copy code -t12/31/2000,15:01:00
-u1
Generate an image containing the UFD file system and the ISO 9660 file system. The ISO 9660 file system will be written using the DOS-compatible 8.3 file name. The UFD file system will be written using the Unicode file name. This option cannot be used in combination with the -n, -nt, or -d options.
-u2
Generate an image that contains only the UFD file system. Any system that cannot read UFD will only see a default text file, warning the user that the image is only available on computers that support UDF. This option cannot be used in combination with the -n, -nt, or -d options.
-ur
Overwrite the default text file for the -u2 option. For example: -urc:\
This option cannot be used in combination with the -n, -nt, or -d options.
-us
Create sparse files when available. This option can only be used with the -u2 option. This option cannot be used in combination with the -n, -nt, or -d options.
-ue
Create an embedded file. This option can only be used with the -u2 option. This option cannot be used in combination with the -n, -nt, or -d options.
-uf
Embed UFD file identifier entry. This option can only be used with the -u2 option. This option cannot be used in combination with the -n, -nt, or -d options.
-uv
During DVD video/audio disk creation, specify UDF video area compatibility. This means that UDF 1.02 and ISO 9660 will be written to disk. Additionally, all files in the VIDEO_TS, AUDIO_TS, and JACKET_P directories will be written first. These directories take precedence over all other collation rules used for this image. This option cannot be used in combination with the -n, -nt, -d, -j1, -j2, -js, -u1, -u2, -ur, -us, -ue, -uf, or -yl options.
-ut
During DVD video/audio disk creation, truncate the ISO 9660 portion of the image. When using this option, only the VIDEO_TS, AUDIO_TS, and JACKET_P directories can be seen from the ISO 9660 file system. This option cannot be used in combination with the -n, -nt, -d, -j1, -j2, -js, -u1, -u2, -ur, -us, -ue, -uf, or -yl options.
-w1
Reports incompatible with all file names and depths of ISO or Joliet.
-w2
Reports all file names that are incompatible with DOS.
-w3
Report all zero-length files.
-w4
Reports are copied to each file name of the image.
-x
Calculate and encode the AutoCRC value in the image.
-yd
Unwarning messages for different files with the same initial 64,000 bytes.
-yl
Specifies a long allocation description, not a short allocation description. This option cannot be used in combination with the -n, -nt, or -d options.
-y5
Specifies the file layout on disk. This option first writes all files in the i386 directory in reverse order.
-y6
Specifies the directory records that should be fully aligned at the end of the sector.
-yo
Specifies the file layout on disk. This option specifies a text file that contains the layout of the files to be placed in the image. The rules for this file are listed below.
The sequential file must be ANSI.
The order file must end with a new line.
The sequential file must contain one file per line.
Each file must be specified relative to the root of the image.
A long file name must be specified for each file. Short names are not allowed.
Each file path length cannot exceed MAX_PATH, including volume name.
Please note that not all files must be listed in sequential files. If there is no sorted file, all files not listed in this file should be sorted in the default order.
Important matters
The -yo option takes precedence over the -y5 option.

-yw
Open the source file and can write to share.
SourceLocation
Required. Specifies the location where you want to create a file into the .iso image.
TargetFile
Specifies the name of the .iso image file.

Create a DVD image
For images above 4.5 GB, a boot sequence file () must be created to ensure that the boot files are at the beginning of the image. For example,
Copy code oscdimg -m -n -yoC:\temp\ -bC:\winpe_x86\
The following files are in the location.
Copy code boot\bcd
boot\
boot\
boot\
boot\
boot\
boot\
boot\en-us\
boot\fonts\chs_boot.ttf
boot\fonts\cht_boot.ttf
boot\fonts\jpn_boot.ttf
boot\fonts\kor_boot.ttf
boot\fonts\wgl4_boot.ttf
sources\