For 2000, the version information is located at the bottom of the main page
of your Report Server
RTM: 8.00.743.00
SP1 : 8.00.878.00
SP2 : 8.00.1038.00
The edition information is stored in the following registry key:
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\80\Reporting Services\ProductCode
Standard: {B19FEFE7-069D-4FC4-8FDF-19661EAB6CE4}
Enterprise: {33FE9EED-1976-4A51-A7AF-332D9BBB9400}
Developer: {2879CA50-1599-4F4B-B9EC-1110C1094C16}
Evaluation: {7C93251A-BFB4-4EB8-A57C-81B875BB12E4}
Thursday, December 15, 2005
"Service Pack 1 Setup Error" during installation of Windows 2003 Service Pack 1
SYMPTOMS
When you run setup installation of Windows 2003 Service Pack 1 on Windows 2003 Data Center
you will prompt with a warning message:
"Service Pack 1 Setup Error
This Service Pack 1 has not been qualified by your hardware vendor for installation on this copy
of Windows Server 2003 Datacenter Server. Please contact your hardware vendor for additional
information on obtaining a Service Pack 1 that has been qualified for your system configuration".
CAUSE
The Windows 2003 Service Pack 1 Installation on Windows 2003 Data Center are block as default
to avoid installation without get full approved to this installation from your "OEM" hardware manufacture.
Note: Installation of Windows 2003 Service Pack 1 is recommended only after your
"OEM" hardware manufacture approved this installation. Skipping this stage may damage your system.
RESOLUTION
The Service Pack 1 installation on Windows 2003 is blocked unless you set a special
registry key.
To set this special registry key, follow the instructions bellow:
1. Go to" Start" -> "Run".
2. Write "Regedit" and press on "Enter" button.
3. Navigate to: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows Server 2003".
4. Right click and choose "New" -> "DWORD Value".
5.Name the new registry key: "DTCUpdate".
6. Double click on "DTCUpdate" and set its "Value data:" to "1".
7. Reboot the server.
CAUTION: Using Registry Editor incorrectly can cause serious problems that can require you to
reinstall the operating system. Microsoft cannot guarantee that problems resulting from incorrect
use of Registry Editor can be solved. Use Registry Editor at your own risk.
Make sure you back up the registry before making changes to it.
MORE INFORMATION
Overview of Windows Server 2003, Datacenter Edition
http://www.microsoft.com/windowsserver2003/evaluation/overview/datacenter.mspx
Windows Server 2003 Service Pack 1
http://www.microsoft.com/windowsserver2003/downloads/servicepacks/sp1/default.mspx
When you run setup installation of Windows 2003 Service Pack 1 on Windows 2003 Data Center
you will prompt with a warning message:
"Service Pack 1 Setup Error
This Service Pack 1 has not been qualified by your hardware vendor for installation on this copy
of Windows Server 2003 Datacenter Server. Please contact your hardware vendor for additional
information on obtaining a Service Pack 1 that has been qualified for your system configuration".
CAUSE
The Windows 2003 Service Pack 1 Installation on Windows 2003 Data Center are block as default
to avoid installation without get full approved to this installation from your "OEM" hardware manufacture.
Note: Installation of Windows 2003 Service Pack 1 is recommended only after your
"OEM" hardware manufacture approved this installation. Skipping this stage may damage your system.
RESOLUTION
The Service Pack 1 installation on Windows 2003 is blocked unless you set a special
registry key.
To set this special registry key, follow the instructions bellow:
1. Go to" Start" -> "Run".
2. Write "Regedit" and press on "Enter" button.
3. Navigate to: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows Server 2003".
4. Right click and choose "New" -> "DWORD Value".
5.Name the new registry key: "DTCUpdate".
6. Double click on "DTCUpdate" and set its "Value data:" to "1".
7. Reboot the server.
CAUTION: Using Registry Editor incorrectly can cause serious problems that can require you to
reinstall the operating system. Microsoft cannot guarantee that problems resulting from incorrect
use of Registry Editor can be solved. Use Registry Editor at your own risk.
Make sure you back up the registry before making changes to it.
MORE INFORMATION
Overview of Windows Server 2003, Datacenter Edition
http://www.microsoft.com/windowsserver2003/evaluation/overview/datacenter.mspx
Windows Server 2003 Service Pack 1
http://www.microsoft.com/windowsserver2003/downloads/servicepacks/sp1/default.mspx
Wednesday, November 09, 2005
A TFTPD32 server as RIS Server
The Best & Quickest solution provided for booting floppy images and WinPe Iso from Network. All Tools used are FREEWARE....
Friday, October 14, 2005
Windows "Vista" aka Longhorn
Get the most updated review @ Paul Thurrott's SuperSite for Windows
http://www.winsupersite.com/vista/
http://www.winsupersite.com/vista/
Wednesday, September 07, 2005
Windows 2003 Product ID Details
How to determine the channel that your copy of Windows Server 2003 was obtained through
Microsoft Windows Server 2003 can be obtained through five channels. These channels include the following channels: retail, evaluation, volume licensing programs, OEM, and checked build. You can use several methods to determine the channel that your software was obtained through. Additionally, this article discusses differences that exist between software that is obtained through different channels. It discusses Windows Product Activation and the Product IDs that are generated when you run the Setup program. This article discusses how to use the Product ID to determine the Microsoft Product Code and to determine the channel that your software was obtained through.
http://support.microsoft.com/?kbid=889713
Microsoft Windows Server 2003 can be obtained through five channels. These channels include the following channels: retail, evaluation, volume licensing programs, OEM, and checked build. You can use several methods to determine the channel that your software was obtained through. Additionally, this article discusses differences that exist between software that is obtained through different channels. It discusses Windows Product Activation and the Product IDs that are generated when you run the Setup program. This article discusses how to use the Product ID to determine the Microsoft Product Code and to determine the channel that your software was obtained through.
http://support.microsoft.com/?kbid=889713
Sunday, August 21, 2005
The Comic Project
Quote from TheComicProject blog
The objective of this project is not to pirate or steal. I grew up on these comics: Phantom, Mandrake, Bahadur: and reading them was so much fun. Yes!! Indrajal Comics!!! Although you will see a few non-indrajal titles, this blog is committed to bring you original Indrajal scans. DEDICATED TO A generation of children growing up on Harry Potter, Cartoon Network and television in general AND Lee Falk
All I can add is don't miss it. Brings back old memories.
The objective of this project is not to pirate or steal. I grew up on these comics: Phantom, Mandrake, Bahadur: and reading them was so much fun. Yes!! Indrajal Comics!!! Although you will see a few non-indrajal titles, this blog is committed to bring you original Indrajal scans. DEDICATED TO A generation of children growing up on Harry Potter, Cartoon Network and television in general AND Lee Falk
All I can add is don't miss it. Brings back old memories.
Friday, July 29, 2005
Tools I use - [Latest Collection]
Clipcache
http://www.clipcache.com/
ACDSee 2.43
http://www.acdsystems.com
Advanced Disk Catalog
http://www.elcomsoft.com/adc.html
AutoStreamer 1033
http://www.neowin.net/forum/index.php?showtopic=223562
Bin2Iso
http://www.codeproject.com/tools/Bin2Iso.asp
http://www.weethet.nl/english/cdrw_bintoiso.php
CDImage
Internal Microsoft CD & DVD Image Tool
CDR Label
http://www.cdrlabel.com/
FreePops
http://freepops.org/
PopPeeper
http://www.poppeeper.com/
FTP Server
http://www.pablosoftwaresolutions.com/
HashCalc
A fast and easy-to-use calculator that allows to compute message digests, checksums and HMACs for files, as well as for text and hex strings. It offers a choice of 13 of the most popular hash and checksum algorithms for calculations
http://www.slavasoft.com/hashcalc/
ISOBuster
The Ultimate CD and DVD data recovery tool !
Rescue lost files from a bad or trashed CD or DVD !
Save important documents, precious pictures or video from the family, your only system backup, ...
IsoBuster can do it all !
IsoBuster is a highly specialized yet easy to use CD and DVD data recovery tool. It supports all CD and DVD formats and all common CD and DVD file-systems (= set of files and folders). Start up IsoBuster, Insert a CD or DVD, select the drive (if not selected already) and let IsoBuster mount the media. IsoBuster immediately shows you all the tracks and sessions located on the media, combined with all file-systems that are present. This way you get easy access, just like explorer, to all the files and folders per file-system. Instead of being limited to one file-system that the OS picks for you, you have access to "the complete picture". Access data from older sessions, access data that your OS (e.g. Windows) does not see or hides from you etc.
Combine this all-revealing functionality with far better read and recovery mechanisms, scanning for lost files functionality, workarounds for a wide range of drive and software bugs, limitations or shortcomings and you have an enormously powerful data recovery tool. IsoBuster is must-have-software for every PC user and is deliberately kept low priced to be able to offer a solution for everybody, even if it is much used in the professional optical and data forensics world.
http://www.isobuster.com/
KeyFinder
http://www.magicaljellybean.com/keyfinder.shtml
Prodkey
http://www.mvps.org/marksxp/WindowsXP/prodkey.php
Neowin UxTheme
NetCaptor
The Best Addon for IE for Tab Browsing
http://www.netcaptor.com
NTinfo - Wininfo, TweakNT
PerfectKeyboard
http://www.pitrinec.com/pkindex.htm
RawWrite
http://uranus.it.swin.edu.au/~jn/linux/rawwrite.htm
ResHack
http://www.angusj.com/resourcehacker/
RNameIt 3.11
http://www.alltheshareware.com/Rnameit-Software-66629.html
Second Copy
http://www.centered.com/
SysInternals - Process Explorer
http://www.systernals.com
TextView
TreeSize Professional
http://www.jam-software.com/freeware/index.shtml
VCDGear
http://www.vcdgear.com
WinAmp 2.95
http://www.winamp.com
Winimage7
http://www.winimage.com
WinRar342
http://www.rarsoft.com
StealthDisk
http://www.sgsix.com/
TrueCrypt
http://truecrypt.sourceforge.net
Cryptainer LE
http://www.cypherix.co.uk/cryptainerle/
WinISO 5.3
http://www.winiso.com/
KeePass
http://keepass.sourceforge.net
Microsoft Schedule+ 7.1
Part of MS Office 95 Suite...One of best and small PIM I have used. I might be wrong in this remark If anyone know about other PIM better than this email me.
Passware - Asterisk Key
http://www.lostpassword.com
http://www.clipcache.com/
ACDSee 2.43
http://www.acdsystems.com
Advanced Disk Catalog
http://www.elcomsoft.com/adc.html
AutoStreamer 1033
http://www.neowin.net/forum/index.php?showtopic=223562
Bin2Iso
http://www.codeproject.com/tools/Bin2Iso.asp
http://www.weethet.nl/english/cdrw_bintoiso.php
CDImage
Internal Microsoft CD & DVD Image Tool
CDR Label
http://www.cdrlabel.com/
FreePops
http://freepops.org/
PopPeeper
http://www.poppeeper.com/
FTP Server
http://www.pablosoftwaresolutions.com/
HashCalc
A fast and easy-to-use calculator that allows to compute message digests, checksums and HMACs for files, as well as for text and hex strings. It offers a choice of 13 of the most popular hash and checksum algorithms for calculations
http://www.slavasoft.com/hashcalc/
ISOBuster
The Ultimate CD and DVD data recovery tool !
Rescue lost files from a bad or trashed CD or DVD !
Save important documents, precious pictures or video from the family, your only system backup, ...
IsoBuster can do it all !
IsoBuster is a highly specialized yet easy to use CD and DVD data recovery tool. It supports all CD and DVD formats and all common CD and DVD file-systems (= set of files and folders). Start up IsoBuster, Insert a CD or DVD, select the drive (if not selected already) and let IsoBuster mount the media. IsoBuster immediately shows you all the tracks and sessions located on the media, combined with all file-systems that are present. This way you get easy access, just like explorer, to all the files and folders per file-system. Instead of being limited to one file-system that the OS picks for you, you have access to "the complete picture". Access data from older sessions, access data that your OS (e.g. Windows) does not see or hides from you etc.
Combine this all-revealing functionality with far better read and recovery mechanisms, scanning for lost files functionality, workarounds for a wide range of drive and software bugs, limitations or shortcomings and you have an enormously powerful data recovery tool. IsoBuster is must-have-software for every PC user and is deliberately kept low priced to be able to offer a solution for everybody, even if it is much used in the professional optical and data forensics world.
http://www.isobuster.com/
KeyFinder
http://www.magicaljellybean.com/keyfinder.shtml
Prodkey
http://www.mvps.org/marksxp/WindowsXP/prodkey.php
Neowin UxTheme
NetCaptor
The Best Addon for IE for Tab Browsing
http://www.netcaptor.com
NTinfo - Wininfo, TweakNT
PerfectKeyboard
http://www.pitrinec.com/pkindex.htm
RawWrite
http://uranus.it.swin.edu.au/~jn/linux/rawwrite.htm
ResHack
http://www.angusj.com/resourcehacker/
RNameIt 3.11
http://www.alltheshareware.com/Rnameit-Software-66629.html
Second Copy
http://www.centered.com/
SysInternals - Process Explorer
http://www.systernals.com
TextView
TreeSize Professional
http://www.jam-software.com/freeware/index.shtml
VCDGear
http://www.vcdgear.com
WinAmp 2.95
http://www.winamp.com
Winimage7
http://www.winimage.com
WinRar342
http://www.rarsoft.com
StealthDisk
http://www.sgsix.com/
TrueCrypt
http://truecrypt.sourceforge.net
Cryptainer LE
http://www.cypherix.co.uk/cryptainerle/
WinISO 5.3
http://www.winiso.com/
KeePass
http://keepass.sourceforge.net
Microsoft Schedule+ 7.1
Part of MS Office 95 Suite...One of best and small PIM I have used. I might be wrong in this remark If anyone know about other PIM better than this email me.
Passware - Asterisk Key
http://www.lostpassword.com
Friday, March 04, 2005
Remove System Folder from Network Share View
Hide the Scheduled Tasks and Printers folder in the network share view
--------------------------------------------------------------------------------
When you browse a computer on the network (\\computername), the Scheduled Tasks appears in addition to shared folders and printers.
To hide the Scheduled Tasks from the network share view, try the steps below:
Click Start, Run and type REGEDIT
Navigate to the following key:
HKEY_LOCAL_MACHINE
\SOFTWARE
\Microsoft
\Windows
\CurrentVersion
\Explorer
\RemoteComputer
\NameSpace
Backup the key by exporting it to a .REG file.
To remove Scheduled Tasks, delete the following key:
{D6277990-4C6A-11CF-8D87-00AA0060F5BF}
To remove the Printers folder, delete the following key:
{2227A280-3AEA-1069-A2DE-08002B30309D}
Close Registry Editor.
--------------------------------------------------------------------------------
When you browse a computer on the network (\\computername), the Scheduled Tasks appears in addition to shared folders and printers.
To hide the Scheduled Tasks from the network share view, try the steps below:
Click Start, Run and type REGEDIT
Navigate to the following key:
HKEY_LOCAL_MACHINE
\SOFTWARE
\Microsoft
\Windows
\CurrentVersion
\Explorer
\RemoteComputer
\NameSpace
Backup the key by exporting it to a .REG file.
To remove Scheduled Tasks, delete the following key:
{D6277990-4C6A-11CF-8D87-00AA0060F5BF}
To remove the Printers folder, delete the following key:
{2227A280-3AEA-1069-A2DE-08002B30309D}
Close Registry Editor.
Monday, February 14, 2005
Friday, February 11, 2005
Some Great Tools I use
KeePass - Password Manager
http://keepass.sourceforge.net
the free, open-source, light-weight and easy-to-use password manager
TrueCrypt - Disk Encryption
http://truecrypt.sourceforge.net
Free open-source disk encryption for Windows XP/2000/2003
http://keepass.sourceforge.net
the free, open-source, light-weight and easy-to-use password manager
TrueCrypt - Disk Encryption
http://truecrypt.sourceforge.net
Free open-source disk encryption for Windows XP/2000/2003
IP Addressing and Subnetting for New Users
What better way to start other than Cisco
http://www.cisco.com/warp/public/701/3.html
What better way to start other than Cisco
http://www.cisco.com/warp/public/701/3.html
Extracting the OEM 9x Preinstallation Wizard from the CD
Extracting the OEM 9x Preinstallation Wizard from the CD
--------------------------------------------------------------------------------
Next, you will need to change to the proper directory on the CD. Type: CD\TOOLS\ADMIN Press the key. -------------------------------------------------------------------------------- Type in the command to extract the wizard using the following format: mkcwrt /C:"command.com /C mkcwrt.bat {CD-ROM drive letter} {drive/path}"
Example: If your CD-ROM drive letter is D: and you would like to extract the wizard to C:\wizard you would us the following command:
mkcwrt /C:"command.com /C mkcwrt.bat D: C:\wizard"
This will launch a second command prompt that extracts the wizard from the CD. It may take several minutes to complete depending on the speed of your CD-ROM.
(TTID #208)
Author: Kevin
If you have an OEM Windows 98fe, Windows 98se, Windows 95 CD you can extract the Installation Wizard from it.
--------------------------------------------------------------------------------
Open up a MS-DOS Prompt / Command Prompt
Change to your CD-ROM Drive Letter. Example if yout CD-ROM is drive letter is D: type:
D:
Press the key.
Known CD Labels Windows Server 2003
Author: TACKtech Team
This list will be updated as additional information becomes available.
If you find any errors or have additional Windows 2003 CD Labels, Contact Us.
Windows 2003 Server Standard Edition (Corporate/VLK | English)
CD Set: -
Windows 2003 Server Standard Edition
NRMSVOL_EN
Windows 2003 Server Enterprise Edition (Corporate/VLK | English)
CD Set: -
Windows 2003 Server Enterprise
NRMEVOL_EN
Windows 2003 Web Server Edition (Corporate/VLK | English)
CD Set: -
Windows 2003 Web Server Edition
NRMWVOL_EN
Windows 2003 Server Standard Edition (English)
CD Set: -
Windows 2003 Server Standard Edition
NRMSFPP_EN
Windows 2003 Server Enterprise Edition (English)
CD Set: -
Windows 2003 Server Enterprise
NRMEFPP_EN
Windows 2003 Web Server Edition (English)
CD Set: -
Windows 2003 Web Server Edition
NRMWFPP_EN
Windows 2003 Server Standard Edition (MSDN Academic Alliance | English)^
CD Set: -
Windows 2003 Server Standard Edition
MSDN Academic Alliance
NRMSFPP_EN
Windows 2003 Server Enterprise Edition Evaluation ISO
CD Set: -
Windows 2003 Server Enterprise Edition Evaluation
NRMEEVL_EN
May 25 2003
CDIMAGE 2.47 (10/12/2000 TM)
Windows 2003 Server Enterprise Edition (Italian)*
CD Set: -
Windows 2003 Server Enterprise Edition (Italian)
NRMEFPP_IT
ISO-9660
MICROSOFT CORPORATION
CDIMAGE 2.47 (10/12/2000 TM)
Data preparer: MICROSOFT CORPORATION, ONE MICROSOFT WAY, REDMOND WA 98052, (425) 882-8080
Boot Catalog at sector 19 Bootable disk
No emulation
load 4 at 0x7c0 from sector 253
Windows Small Business Server 2003 RC
CD Set: -
Windows Small Business Server 2003
RC Disc 1
Trial Software
180-Day Limit on Use
0703 Part No. X09-83616
Data CD Mode 1
ISO9660 (bootable)
NRCFRE1_EN
24 June 2003
MICROSOFT CORPORATION
CDIMAGE 2.47 (10/12/2000 TM)
Windows Small Business Server 2003
RC Disc 2
Trial Software
180-Day Limit on Use
0703 Part No. X09-83617
Data CD Mode 1
ISO9660
NRCFRE2_EN
24 June 2003
MICROSOFT CORPORATION
CDIMAGE 2.47 (10/12/2000 TM)
Windows Small Business Server 2003
RC Disc 3
Trial Software
180-Day Limit on Use
0703 Part No. X09-83618
Data CD Mode 1
ISO9660
NRCFRE3_EN
23 June 2003
MICROSOFT CORPORATION
CDIMAGE 2.47 (10/12/2000 TM)
Windows Small Business Server 2003
OUTLOOK 2003 Interim Build
Trial Software
180-Day Limit on Use
0703 Part No. X09-83619
Data CD Mode 1
ISO9660
OFFICE11
23 June 2003
MICROSOFT CORPORATION
CDIMAGE 2.47 (10/12/2000 TM)
Windows Small Business Server 2003
RC Premium Technologies
Trial Software
180-Day Limit on Use
0703 Part No. X09-83620
Data CD Mode 1
ISO9660
PREMTECH
23 June 2003
MICROSOFT CORPORATION
CDIMAGE 2.47 (10/12/2000 TM)
Windows Small Business Server 2003
Resource CD
Trial Software
180-Day Limit on Use
0703 Part No. X09-83620
Data CD Mode 1
ISO9660, Joilet
sbs03pre
1 July 2003
n/a
Prassi PrimoDVD 2.0 - Build 2.0.837
Author: TACKtech Team
This list will be updated as additional information becomes available.
If you find any errors or have additional Windows 2003 CD Labels, Contact Us.
Windows 2003 Server Standard Edition (Corporate/VLK | English)
CD Set: -
Windows 2003 Server Standard Edition
NRMSVOL_EN
Windows 2003 Server Enterprise Edition (Corporate/VLK | English)
CD Set: -
Windows 2003 Server Enterprise
NRMEVOL_EN
Windows 2003 Web Server Edition (Corporate/VLK | English)
CD Set: -
Windows 2003 Web Server Edition
NRMWVOL_EN
Windows 2003 Server Standard Edition (English)
CD Set: -
Windows 2003 Server Standard Edition
NRMSFPP_EN
Windows 2003 Server Enterprise Edition (English)
CD Set: -
Windows 2003 Server Enterprise
NRMEFPP_EN
Windows 2003 Web Server Edition (English)
CD Set: -
Windows 2003 Web Server Edition
NRMWFPP_EN
Windows 2003 Server Standard Edition (MSDN Academic Alliance | English)^
CD Set: -
Windows 2003 Server Standard Edition
MSDN Academic Alliance
NRMSFPP_EN
Windows 2003 Server Enterprise Edition Evaluation ISO
CD Set: -
Windows 2003 Server Enterprise Edition Evaluation
NRMEEVL_EN
May 25 2003
CDIMAGE 2.47 (10/12/2000 TM)
Windows 2003 Server Enterprise Edition (Italian)*
CD Set: -
Windows 2003 Server Enterprise Edition (Italian)
NRMEFPP_IT
ISO-9660
MICROSOFT CORPORATION
CDIMAGE 2.47 (10/12/2000 TM)
Data preparer: MICROSOFT CORPORATION, ONE MICROSOFT WAY, REDMOND WA 98052, (425) 882-8080
Boot Catalog at sector 19 Bootable disk
No emulation
load 4 at 0x7c0 from sector 253
Windows Small Business Server 2003 RC
CD Set: -
Windows Small Business Server 2003
RC Disc 1
Trial Software
180-Day Limit on Use
0703 Part No. X09-83616
Data CD Mode 1
ISO9660 (bootable)
NRCFRE1_EN
24 June 2003
MICROSOFT CORPORATION
CDIMAGE 2.47 (10/12/2000 TM)
Windows Small Business Server 2003
RC Disc 2
Trial Software
180-Day Limit on Use
0703 Part No. X09-83617
Data CD Mode 1
ISO9660
NRCFRE2_EN
24 June 2003
MICROSOFT CORPORATION
CDIMAGE 2.47 (10/12/2000 TM)
Windows Small Business Server 2003
RC Disc 3
Trial Software
180-Day Limit on Use
0703 Part No. X09-83618
Data CD Mode 1
ISO9660
NRCFRE3_EN
23 June 2003
MICROSOFT CORPORATION
CDIMAGE 2.47 (10/12/2000 TM)
Windows Small Business Server 2003
OUTLOOK 2003 Interim Build
Trial Software
180-Day Limit on Use
0703 Part No. X09-83619
Data CD Mode 1
ISO9660
OFFICE11
23 June 2003
MICROSOFT CORPORATION
CDIMAGE 2.47 (10/12/2000 TM)
Windows Small Business Server 2003
RC Premium Technologies
Trial Software
180-Day Limit on Use
0703 Part No. X09-83620
Data CD Mode 1
ISO9660
PREMTECH
23 June 2003
MICROSOFT CORPORATION
CDIMAGE 2.47 (10/12/2000 TM)
Windows Small Business Server 2003
Resource CD
Trial Software
180-Day Limit on Use
0703 Part No. X09-83620
Data CD Mode 1
ISO9660, Joilet
sbs03pre
1 July 2003
n/a
Prassi PrimoDVD 2.0 - Build 2.0.837
Batch Guide
Author: Terry Newton
Article mirrored with permission of author. View Original Article.
--------------------------------------------------------------------------------
This is an attempt at explaining the MSDOS batch language. It is not complete, just the basics. For more information on individual commands refer DOS's built-in HELP command. Some familiarity of DOS is assumed, you should already know what directories are and how to use common commands like CD, MD, DEL, RENAME etc.
Table of Contents
Elements of the batch language
Variables
Redirection and Pipes
Labels, Conditions and Branching
Subroutines, CALL and FOR
Launching programs
The path...
Batch for running a virus scanner
Launching Windows 95 programs and associated files
Menus for programs
Simple example game menu
Using menuing systems
Obtaining user input
Batch routine for entering strings
How to set up SHELL and ANSI
Processing Lists of Data
Demo batches for processing subdirectories
Windows 95 considerations
A method with does not use loadfix.com
Creating and running other programs from batch
batch/qbasic string input routine
batch/qbasic global string change utility
intermixing perl and batch
Making decisions based on the output of a program
All of the examples assume English DOS 6, some may run under DOS 5 but don't count on it. DOS 6 adds features which are very useful to batch programmers, like CHOICE and a version of FIND that returns an errorlevel.
--------------------------------------------------------------------------------
Elements of the Batch Programming Language
The best way to learn batch is to experiment while referring to the HELP command, it explains everything. Batch programs are essentially sequences of DOS commands that 'type themselves' when the batch file is run.
Batch files consist of control elements, internal DOS commands and external commands or programs. With a little ingenuity one can duplicate most of the functions of a general purpose language, but doing any kind of math is tricky, there are no arithmetic commands at all. For the types of things batch is used for, this is not much of a problem.
Variables
Batch uses the percentage sign (%) to mark variables. The set command is used to assign and clear variables. When DOS reads the batch file, strings like copy %var1% %var2% will be expanded to read say copy source.fil dest.fil (assuming that's what they're set to) before feeding the line to the command interpreter. %% is reduced to % when interpreted, so the at-the-prompt commandfor %a in (1 2 3) do echo %a has to be written in a batch file as for %%a in (1 2 3) do echo %%a.
Variable names have eight significant characters (I think) and are always stored as upper case (except for the 'windir' variable added by Windows). [Testing under Win95 shows that variable names can be longer than 8 characters and all characters are significant, can't say about Dos 6.] In addition to user-set variables, the entire command line is passed to the batch as the read-only variables %0 to %9. %0 is the actual batch name as typed, the rest are parameters. The shift command moves everything down by one allowing parameters past the ninth to be retrieved (this wipes out the %0 parameter so if used for the batch to call itself it must be saved to another variable).
The following batch illustrates the use of variables...
@echo off
set var1=Hello
set var2=World
echo %var1% %var2%!
set var1=
set var2=
Explanation - the first line prevents the commands from being displayed, the @ in @echo off keeps that line from displaying. The set command is used to set two variables to "Hello" and "World". Next, echo is used to display the two variables to the screen followed by "!" producing the classic Hello World! display. Finally the two variables are cleared to keep them from needlessly consuming environment space.
Speaking of environment, you should specify more space than stock DOS gives you by using a CONFIG.SYS line similar to...
shell=c:\command.com /e:1024 /p
The number after /e: specifies how much space to set aside, usually 1024 is plenty. You can also execute command /e:5000 /c progname if you need a bunch of space. This can be included inside the batch itself. For quickies, especially if you wish to restore all variables to their original state after testing something, just enter command /e:5000. Type exit to quit the command shell and return to the previous environment.
Redirection and Pipes
Normally, input is taken from the keyboard and output goes to the console. Redirection allows input and output to refer to a file or device instead. Pipes allow the output of one program to be used as input to another program. These symbols only work with programs that read from "standard input" and write to "standard output" but fortunately this includes most DOS commands.
The < symbol causes file to be fed to the program as input.
The > symbol causes the program's output to be sent to the following file or device.
The >> symbol causes the program's output to be appended to the file or device.
The | symbol (the pipe) causes the output of the preceding program to be sent to the following program.
The following example shows how to use redirection with the FIND command...
@echo off
find %1<%2>nul
if not errorlevel 1 echo %2 contains %1
If saved as say DOESIT.BAT, entering doesit "Word" text.fil will print text.fil contains "Word" if the file TEXT.FIL contains the string "Word" (at least under DOS 6). Since we're not interested in the actual output of the FIND command, it is redirected to the nul device.
Labels, Conditions and Branching
A label is any line that begins with a colon. Comments in batch code can be made by using a double-colon, this is better than using the REM command because labels are processed before redirection symbols. :: causes no problems but rem produces errors.
The goto command is used to transfer control to another part of the batch file. For example...
:: test goto's
@echo off
goto start
*** This text can be anything ***
*** because it will never run ***
:start
echo Done.
The decision mechanism in batch is the if command. It can be used to compare one string to another, determine if a file exists or determine the errorlevel returned by a previous command. If the evaluation is true, the rest of the command is executed. The not modifier reverses the evaluation results. Examples...
if not %var%.==. goto got_var
if exist MYFILE.DAT goto got_file
if errorlevel 5 echo Errorlevel is equal or greater than 5
if not errorlevel 4 echo Errorlevel is less than 4
Notice the periods in the if %var%.==. example, they keep empty variables from producing syntax errors. '%var%. is equal to . only if the string is empty. The way the command is worded it branches to :got_var only if %var% is not empty. Read the wording in the if errorlevel command, any errorlevel equal or greater than 5 is evaluated as true.
Subroutines, CALL and FOR
Most of the elements are in place, but still no subroutines. These can be tackled either by defining a return value and GOTO'ing the routine, which GOTO's to the value of the return variable upon completion. For example...
set return=next1
goto subroutine
:next1
-- bla bla --
goto end
:subroutine
-- bla bla --
goto %return%
:end
A more elegant way is to use a branch at the top of the batch that branches to the subroutine. This can be combined with the for and call commands to perform a sequence of steps. Here is an example that prints the names of files in the current directory matching filespecs on the command line...
@echo off
if %1.==Sub. goto %2
for %%a in (%1 %2 %3 %4 %5) do call %0 Sub printname %%a
goto end
:printname
echo %3
:end
Launching programs
One of the most useful aspects of batch is its ability to set up custom environments for running programs. Here is a typical made-up scenario: Suppose you have a game that requires you to change to say the C:\GAMES\MUT then run the program MUTANT with the command line parameter /NSB. Rather than typing all that, just put it into a batch and place it in a path directory.
The path - this is a list of directories held in the %PATH% variable that DOS uses to find programs without having to specify the directory it's in. For example, the default path in a simple setup might read (from autoexec.bat)...
path C:\DOS;C:\WINDOWS;C:
Each directory is separated by a semicolon. When a command is typed first DOS tries the current directory. If not there it begins searching each directory listed in the path line. It is convenient to place batch files in a path directory. If you haven't done so yet, make the directory C:\BATCH (for example) and add it to the path line, as in...
path C:\DOS;C:\WINDOWS;C:\;C:\BATCH
Any batch file now placed in C:\BATCH can be run from anywhere without having to change directories. Now, back to the mythical example, let's put all of the required commands into a file called say MUTANT.BAT and place it in C:\BATCH (on the path now)...
@echo off
c:
cd \games\mut
mutant /NSB
The first line turns off command echo (contained at the beginning of almost all batch files), the next line ensures the C drive is active, then it changes to the correct directory using the cd command and runs the game with the correct command line parameter.
Here is an example for a virus scanner that does not change the current directory, but instead calls a program in another directory. In this particular example, if the batch is called without parameters defaults are supplied instead...
@echo off
set parm=%1 %2 %3 %4 %5 %6 %7 %8 %9
if %1.==. set parm=. /nomem /sub
c:\scanners\scan\scan.exe %parm%
set parm=
The specific commands, directories and parameters will vary depending on the software and where it is installed. The command line is stored in the variable %parm%, if the first parameter %1 is empty, %parm% is set to a useful default, for SCAN this translates to "scan the current and all subdirectories under it, do not scan memory". If this batch was saved as say SCN.BAT into a path directory (got that C:\BATCH directory yet?) any directory branch may be scanned by just typing SCN instead of having to type the directory\command parameters.
Launching Windows 95 programs and associated files...
Windows 95 has a built-in utility for launching Windows programs and files that are associated with Windows programs directly from batch, a very useful addition! Previously this required special utilities to "bridge the gap". The basic syntax is simple...
start /w filename [command line arguments]
The full filename with directory information must be specified if not in the current directory or on the path, as usual. If filename is a long filename or contains spaces, enclose it in quotes. The /w option causes the batch to wait for the file to be closed before continuing with the batch, otherwise batch processing continues in parallel. Other start options include /m to run minimized and /max to run full screen. For example...
start /w /max "C:\Program Files\Myprogram\readme.txt"
Anything that can be double-clicked to run can be launched with start. One very useful application of this is running Windows files from inside a dos-based zip file viewer like AView that allows different viewers to be set up for various extensions. Here is a general purpose viewer for using with dos programs...
:: RUNAFILE.BAT (for example)
@echo off
start /w %1
Windows will figure out what to launched based on the selected file's extension.
Menus for programs
The CHOICE command that comes with DOS 6 is handy for creating custom menus for DOS programs as well as simple Yes/No questions. Here is a simple menu for a few games...
@echo off
:menu
c:
cd\games
cls
echo GAMES MENU
echo ==========
echo.
echo 1 - Doom
echo 2 - Raptor
echo 3 - FlightSim
echo 4 - Lotus
echo.
echo Q - Quit
choice /c:1234Q>nul
if errorlevel 5 goto done
if errorlevel 4 goto lotus
if errorlevel 3 goto flightsim
if errorlevel 2 goto raptor
if errorlevel 1 goto doom
echo CHOICE missing
goto done
:doom
cd doom
doom
goto menu
:raptor
cd raptor
rap
goto menu
:flightsim
d:
cd\fs4
fs4
goto menu
:lotus
cd lotusdrv
lotus
goto menu
:done
The idea is simple, set up initial conditions, in this case change to the C: drive and the \games directory, print a menu using ECHO commands (use echo. to print a blank line) then run the CHOICE command with the parameter /c:1234Q (the valid choices) and redirect it to >nul so it doesn't mess up the screen. After the user makes a decision, the errorlevel returned depends on which one was picked, selecting Raptor for example returns errorlevel 2. They are listed backwards because "if errorlevel 2 do something" really means "if the errorlevel is 2 or greater do something".
ANSI codes can be used to spruce up menus like these, even decent interfaces can be constructed in color using nothing but batch code. Several menu utility programs are also available that are called from batch.
Using menuing systems...
Several freeware, shareware and commercial menuing programs are available that let you create nice-looking menus for your system. They're not as fun as doing it entirely in batch but they can be more productive.
A more elaborate program is something called GO-MENU from an archive called DOSVAR20 from Pinnacle Software. The shareware program was something for manipulating strings (and was never even run) but GO-MENU.EXE is great. Here is its help screen when run with "/?"...
GO-MENU v1.21A -- Copyright (C) 1991,92 Pinnacle Software (Montreal)
Purpose: Displays a menu of up to 10 items
Author: Tim Campbell (Dial 514-345-9578; GEnie T.CAMPBELL11)
Format: GO-MENU [menu-file-name] [nnn] [save-file-name]
Parms: Specify nnn to save & read last selection
nnn is a save index from 0 to 255
save-file-name is the file that holds up to 256 saves
Program can continue if create or read of save file fails
Defaults: menu-file-name = GO-MENU.MNU
save-file-name = GO-MENU.SAV
Menu File: Line 1 Menu heading
Line 2+ Menu lines
Note: Lines starting with ; are ignored
Returns: 1 - 10 depending on menu selection
200 if user pressed Esc in menu
250 for help request (this display)
255 for program error
Here is an example of how I use it, extracted from my master system batch...
@echo off
--- stuff ---
:menu
c:
cd go-menu user.mnu
if errorlevel 11 goto exit
if errorlevel 10 goto boot1
if errorlevel 9 goto pic
if errorlevel 8 goto tape
if errorlevel 7 goto scanners
if errorlevel 6 goto editfiles
if errorlevel 5 goto sysinfo
if errorlevel 4 goto house
if errorlevel 3 goto setevars
if errorlevel 2 goto prompt
if errorlevel 1 goto windows
goto menu
:windows
win
goto menu
:prompt
command /e:2048
goto menu
--- more menus etc ---
This is the text file USER.MNU to define the menu text...
My Computer System
Run Windows
Run DOS Prompt
Set Environment
HouseKeeping Utilities
System Information
Files / Environment
Scanners
Backup
PIC Menu
Reboot
I have no idea if GO-MENU is freeware, shareware or isn't even supposed to be used but it does work well. You can probably find it in the SimTel archives. Look for "DOSVAR20.ZIP". Many others are available, enough to cause mental overload actually. Some of them can create very elaborate screens once you master their convulted syntax (I haven't...).
Obtaining User Input
The CHOICE command is fine for asking limited-choice questions but it is no-good for getting real strings like a filename. There are two approaches that can be taken - use an external COM file like SENVAR.COM that directly sets a variable entered by the user. Or you can do it completely in batch. I've seen a couple of variations to this technique, one is contained in Dirk Van Deun's Collection of Batch Techniques file. The one I've been using originated from a computer magazine, I've modified it to put the temp files in C:\DOS to avoid accidentally overwriting 'ENTER.BAT'. You might need to change the directory, or just eliminate it altogether.
@echo off
:: based on batch from PC Magazine June 27, 1995 page 248
:: this version puts temps in C:\DOS dir and shortens var names
:: User input is returned in variable STR
:input
> C:\DOS\en#er.bat fc con nul /lb1 /n|date|find " 1: "
> C:\DOS\enter.bat echo set str=
>>C:\DOS\enter.bat echo :loop
>>C:\DOS\enter.bat echo if not '%%str%%==' set str=%%str%% %%5
>>C:\DOS\enter.bat echo if '%%str%%==' set str=%%5
>>C:\DOS\enter.bat echo shift
>>C:\DOS\enter.bat echo if not '%%5==' goto loop
call en#er.bat
del C:\DOS\enter.bat
del C:\DOS\en#er.bat
Simply "call input.bat" (assuming that's what it's named) and the user string is returned in the %str% variable. If this routine is included in the batch program itself, set a return variable and call it like a subroutine as in...
echo Enter filename...
set return=here
goto input
:here
echo You entered %str%
set return=
goto done
:: above input routine
:input
:: ...
goto %return%
:done
A simpler way to call it is to use a universal branch at the top of the batch...
@echo off
if .%1==.Loop goto %2
then when you want input do a...
echo Enter filename...
call %0 Loop input
:: filename in %str%
When using batch input routines, do not enter redirection symbols or other stuff that messes up DOS, especially < > and |.
How to set up SHELL and ANSI
To use batch effectively you should check your CONFIG.SYS file for proper settings. To use color you need something like:
DEVICE=C:\DOS\ANSI.SYS
or if UMBs are available (have a DOS=HIGH,UMB line) use:
DEVICEHIGH=C:\DOS\ANSI.SYS
If this line is not present add it with the other DEVICE's, might help if it's first but that probably doesn't matter. When ANSI.SYS is active it interprets escape codes that set screen colors, move the cursor and all kinds of useful things. Type in HELP ANSI.SYS at a dos prompt for a detailed list of the available commands.
Among the commands is the ability to re-define any key to output an entire sequence of keys and commands upon typing the file. Files containing these sequences are known as Key Macros or ANSI Bombs, depending on the commands they contain. I use key macros to redefine my function keys to useful dos commands. I am very used to hitting control-x instead of typing E X I T Return. Just be aware of the potential problem and don't TYPE strange files. Use something like LIST. Other versions of ANSI are available that do not allow key redefinition if this makes you nervous. ThunderByte's anti-virus driver will also prevent key redefinition after it's called, just define what you want defined before calling TBDRIVER.
To prevent out-of-environment errors when running batch files you should also have a SHELL statement in CONFIG.SYS to specify a larger-than-normal environment, something like:
shell=c:\command.com /e:1024 /p
Some computers have COMMAND.COM only in the DOS directory, if there is no COMMAND.COM in the root change 'c:\command.com' to 'c:\dos\command.com' or wherever it is. If a 'set comspec=c:\command.com' line is present it should match the path\filename given in the shell command.
--------------------------------------------------------------------------------
Processing Lists of Data
A nagging problem in batch programming is how to take a list of items in a file and do anything useful with it. One solution is to use Ed Schwartz' @.COM program or a similar external utility, but there is a way to do it entirely with batch if certain precautions are taken.
The trick is to take the Dos file LOADFIX.COM and copy it to the filename ENTER.COM then use the DATE command to read the data file and output it as a batch. LOADFIX is a seldom-used command that simply loads and runs program above the first 64K of memory. It doesn't seem to have many uses as intended, but since it merely runs its parameters and it's a COM file it can be very useful for data processing from batches since it can simulate a call command without using 'CALL'. How is this useful? The DATE command outputs the string 'Enter new date (mm-dd-yy): ' then waits for input. If the input is not a valid date, it re-displays the prompt and gets more input until either a valid date or an empty line is entered. This has the effect of prepending 'Enter new date (mm-dd-yy): ' in front of each line of an input file. If LOADFIX were renamed to ENTER then each line will attempt to run NEW and whatever was in the original list shows up as parameter %3 and up. The obvious disadvantage of this technique is the input list cannot contain a valid date! Other than that it looks like a very promising technique.
The following demo batch creates a list of subdirectories then processes the list one item at a time...
:: demo - process subdirectories - by Terry Newton
:: overwrites ENTER.COM DIRFILE$ DIRFILE$.BAT NEW.BAT
@echo off
:: check and branch to subroutine
if .%1==.DoDir goto DoDir
:: prepare ENTER.COM file (change c:\dos\ if different)
copy c:\dos\loadfix.com enter.com > nul
:: prepare a list of fully qualified subdirectories
dir /s /ad /b > dirfile$
:: add a blank line to the end so DATE will exit
echo.>>dirfile$
:: run each line through date to make the list-batch
type dirfile$|date|find "Enter" > dirfile$.bat
:: get rid of the original list
del dirfile$
:: prepare NEW batch to call main program for
:: each item of the list
echo @echo off > new.bat
echo %0 DoDir %%3 >> new.bat
:: now call the list-processing batch
call dirfile$.bat
:: delete the temp files and get out
del dirfile$.bat
del enter.com
del new.bat
goto done
:: This subroutine is called by NEW.BAT for each item
:: in the list plus the blank line at the end
:DoDir
if .%2==. goto done
:: here for each subdirectory with name in %2
echo Looking at subdirectory %2...
::
:done
Be sure that you do not have a NEW.BAT or ENTER.COM program in the current directory, they will be overwritten. In the above example, the DIR /S switch ensures that no item will be a valid date, but if /S were omitted there would be a chance a directory name might just happen to also be a date and cause your system date to be set incorrectly, so be careful when using this technique.
Examples of this technique...
RESETARC.BAT and RESETALL.BAT are a couple of batch files I made for dealing with a tape backup program that doesn't reset the archive attributes on the files it backs up. Yuk! RESETARC resets the archive bits on files in the current directory and all subdirectories below it, RESETALL resets the archive bits on every file on every drive (edit for your system). Although that's an oddball kind of function they make simple templates to use for doing other oddball functions in every directory, just substitute your commands in place of the attrib command.
DIZZY.BAT builds a file containing the contents of all FILE_ID.DIZ files in and under a specified directory. I never knew I had so much stuff!
Windows 95 considerations...
The subroutine demos will work under Windows 95 provided a compatible loadfix.com exists and can be found, and no long directory names are involved. Windows 95 leaves out many old dos commands including loadfix.com, if you haven't already, look for them at Microsoft's site or on the install CD. The main 95 difference for these batches is the /b switch of the DIR command outputs long names, an advantage or disadvantage depending on the application. Most dos commands can handle long filenames (provided they're enclosed by quotes) so if copying or other simple tasks it's no problem. If running an old dos app that does not understand long filenames then about all that can be done is copy the target file to another file first then call the dos app on the shorter name. I have no trick long-to-short name routines but I'm sure it can be done.
The demo code conversions are not too bad, at least for the first six spaces. The main difference is as many parms possible are passed in the code that calls the subroutine, and the subroutine reconstructs the parms into a variable containing the directory name.
:: demo - process subdirectories - by Terry Newton
:: overwrites ENTER.COM DIRFILE$ DIRFILE$.BAT NEW.BAT
:: windows 95 compatible
@echo off
:: check and branch to subroutine
if .%1==.DoDir goto DoDir
:: prepare ENTER.COM file (looks in 2 places, hardcode if different)
if exist c:\dos\loadfix.com copy c:\dos\loadfix.com enter.com>nul
if exist c:\windows\command\loadfix.com copy c:\windows\command\loadfix.com enter.com>nul
:: prepare a list of fully qualified subdirectories
dir /s /ad /b > dirfile$
:: add a blank line to the end so DATE will exit
echo.>>dirfile$
:: run each line through date to make the list-batch
type dirfile$|date|find "Enter" > dirfile$.bat
:: get rid of the original list
del dirfile$
:: prepare NEW batch to call main program for
:: each item of the list
echo @echo off > new.bat
echo %0 DoDir %%3 %%4 %%5 %%6 %%7 %%8 %%9>> new.bat
:: now call the list-processing batch
call dirfile$.bat
:: delete the temp files and get out
del dirfile$.bat
del enter.com
del new.bat
goto done
:: This subroutine is called by NEW.BAT for each item
:: in the list plus the blank line at the end
:DoDir
if .%2==. goto done
:: here for each subdirectory
set dirname=
:DoDirparms
set dirname=%dirname%%2
if .%3==. goto DoDirgotit
set dirname=%dirname% % nullmarker%
shift
goto DoDirparms
:DoDirgotit
echo Looking at subdirectory %dirname%...
::
:done
List processing without loadfix...
Having to locate a possibly non-existent loadfix.com is a hassle to say the least, especially these days. If the list isn't very large and processing time isn't critical, there is another way to work through a list using only common dos commands. The technique is to create a list ending with a blank line, run through date to create a temp batch, so far just like the previous method but instead of creating enter.com, create an enter.bat that sets the variable. When the temp batch runs, only the first enter line will execute, so after it returns use the find /v command to remove the last item processed, then loop until the empty line is encountered. Each item takes a bit longer to process because of the removal step, but in applications where an appreciable time is spent on each item, this doesn't matter much, better to have the simplicity.
A demo that collects and appends all .DIZ files in and below a directory into a single file...
:: find all .DIZ files in and below current directory
:: and append them into a single DIZFILES.TXT file.
:: coded by Terry Newton
@echo off
:: branch if need be
if .%1==.DoFile goto dofile
:: empty the output file
rem > dizfiles.txt
:: create a list of files (/-p in case pause in dircmd)
dir /s /b /-p *.DIZ > lstfile$
:: end with blank line
echo.>> lstfile$
:: run through date to make tempbat
type lstfile$ | date | find "Enter" > lstfile$.bat
:: create an enter.bat to be run by listfile$.bat
echo %0 DoFile %%4 %%5 %%6 %%7 %%8 %%9 > enter.bat
:loop
:: run temp batch
lstfile$.bat
:: ends up here with filename at parm2 and up
:dofile
:: check for exit condition
if .%2==. goto done
:: derive filename from parms
:: (only needed for long names, otherwise refer to %2)
set fname=
:doparms
set fname=%fname%%2
if .%3==. goto gotparms
set fname=%fname% % nullmarker%
shift
goto doparms
:gotparms
:: give operater something to look at
echo Working on %fname%...
:: add filename and file to output file
>> dizfiles.txt echo -------- %fname% --------
>> dizfiles.txt type "%fname%"
>> dizfiles.txt echo.
>> dizfiles.txt echo.
:: done with that file, so remove entry from lstfile$.bat
type lstfile$.bat | find /v "%fname%" > lstfile$.bat
:: and loop
goto loop
:done
:: finished, remove temp files
del enter.bat
del lstfile$.bat
del lstfile$
This demo incorporates Windows-95 compatibility fixes, if your application does not have filenames with spaces in them several lines of code can be saved, so if using Windows 3.1 or Dos, make the "dofile" part like this instead...
:dofile
:: check for exit condition
if .%2==. goto done
:: give operater something to look at
echo Working on %2...
:: add filename and file to output file
>> dizfiles.txt echo -------- %2 --------
>> dizfiles.txt type %2
>> dizfiles.txt echo.
>> dizfiles.txt echo.
:: done with that file, so remove entry from lstfile$.bat
type lstfile$.bat | find /v "%2" > lstfile$.bat
:: and loop
goto loop
Not totally sure (never tried it..) but the quotes around possibly long filenames will probably confuse older doses, something else to watch out for if making batch code that must run on multiple dos versions. One thing for sure, without the quotes it fails under 95 with a "too many parameters" error the first time a space is encountered in a filename.
In all of these demos, lists of filenames are used but the list does not have to be that, it can be a list of anything so long as only the last line is empty and no redirection characters (< > | ) or separators (; , = ) involved. Redirection not enclosed by quotes create errors and unpredictibly-named files, separators are converted to spaces. However processing lists of filenames does seem to be the obvious use.
--------------------------------------------------------------------------------
Creating and running other programs from batch
Often times batch simply is not powerful enough or too slow to do the things that need to be done, this is when other program interpreters like QBasic and even debug can come in very handy. Using debug and assembly code in general is beyond the scope of this text and me also, I learn a few commands and work with them. QBasic isn't hard to learn though, and you do not need to learn everything to be able to use it from batch files. Reading and writing files, doing some mathematical computations (but read on), fancy screen displays and interfaces and many other cool tricks can be accomplished using batch code that writes and runs temporary basic programs. If you look around my batch site you'll find many examples.
User input? The all-batch solution is ok but here's another way...
@echo off
echo>$inp$.bas bad$="<|>=,;":on error goto done
echo>>$inp$.bas ? "Enter something: ";
echo>>$inp$.bas line input a$:if a$="" goto wrbat
echo>>$inp$.bas for i=1 to len(bad$)
echo>>$inp$.bas if not instr(a$,mid$(bad$,i,1))=0 then a$="(error)"
echo>>$inp$.bas next i
echo>>$inp$.bas wrbat:open "$inp$.bat" for output as #1
echo>>$inp$.bas ? #1,"set input=";a$
echo>>$inp$.bas done:close #1:system
qbasic /run $inp$.bas
call $inp$.bat
del $inp$.ba?
echo You entered %input%
How it works... the batch code writes out a temporary basic program and runs it, the basic code prints a prompt, collects a line of user input, checks it for characters that can cause errors and replaces the input line with "(error)" if present, then writes a temporary batch that sets a variable to the input line. After the basic completes, the batch calls the temp batch to set the input variable, deletes the temp files and displays the input variable.
Ok a couple of further explorations... first off if you haven't figured it out, dos doesn't care much where redirection occurs in a command, it makes things look neater if the redirection is immediately after the echo so the remainder resembles what actually gets written, handy anytime creating files with batch but leave "echo." as "echo.>>file". Writing out strings that contain redirection symbols is not a problem, the quotes hide them from dos. The main trick is avoiding errors from < and > characters in math expressions. Fortunately just about any math equation using such characters can be rewritten with not and sgn to avoid the problem. For example, if a > b then... won't work, instead use something like if sgn(a-b)=1 then... In the input example it wasn't if instr(...)<>0 but rather if not instr(...)=0.
Some more basic to batch conversions...
if a < 5 then... if sgn(5 - a) = 1 then...
if a <> 5 then... if not a = 5 then...
if a <= b then... if not sgn(a - b) = 1 then...
When writing any file from batch (this applies to batch, qbasic or anything) the cardinal rules are %% becomes %, variables are substituted with their contents, and the characters < > and | must be enclosed in quotes or not used at all.
Here is another useful newly hacked-out example of using qbasic from batch...
:: CHSTRING.BAT - changes all occurences of one string to
:: another, if newname is not specified overwrites filename
:: under win 95 strings can contain spaces and separators
:: requires at least dos 6 and qbasic.exe
@echo off
:: verify that it has enough parms
if .%3==. echo CHSTRING "matchstring" "newstring" filename [newname]
if .%3==. goto end
:: verify that file is present
if exist %3 goto fileok
echo file %3 not found
goto end
:fileok
:: verify quotes
echo %1|find """">nul
if errorlevel 1 echo no quotes around string(s)
if errorlevel 1 goto end
echo %2|find """">nul
if errorlevel 1 echo no quotes around string(s)
if errorlevel 1 goto end
:: create a custom qbasic program
echo>chstr$$.bas :on error goto done
echo>>chstr$$.bas ls1=len(%1):open "%3" for input as #1
echo>>chstr$$.bas open "newfl$$$" for output as #2
echo>>chstr$$.bas doit:line input #1,a$:if a$="" goto wline
echo>>chstr$$.bas chline:la=len(a$):if sgn(ls1-la)=1 goto wline
echo>>chstr$$.bas b$="":c$="":p=instr(a$,%1):if p=0 goto wline
echo>>chstr$$.bas if not p=1 then b$=left$(a$,p-1)
echo>>chstr$$.bas if not p+ls1=la then c$=right$(a$,la-p-ls1+1)
echo>>chstr$$.bas a$=b$+%2+c$:goto chline
echo>>chstr$$.bas wline:print #2,a$:goto doit
echo>>chstr$$.bas done:close #1:close #2:system
:: run and delete it
qbasic /run chstr$$.bas
del chstr$$.bas
:: move output to appropriate filename
if not .%4==. move newfl$$$ %4>nul
if .%4==. move newfl$$$ %3>nul
:end
How it works... (I hate this part:) The initial batch lines verify the parameters for correctness and if not display various messages. Once it's satisfied with the parms it creates a temporary qbasic program that changes all occurences of "match string" to "new string", writing the results to a temp file. After running and deleting the qbasic program, it checks to see if an output filename was specified, if so it copies the temp output file to that otherwise overwrites the specified file with the changes.
The strings must be enclosed in quotations, under Windows 95 they can contain spaces and separators like commas, under Dos 6 the strings must be all one word without any strange characters, sorry... another Win95 difference, but I like this one. A related feature is specifying long filenames using quotes, many lfn-unaware batches still work if the filenames are quoted to keep the parameters intact.
This is a batch guide, not a qbasic guide so I won't explain the basic part much, qbasic has an extensive on-line help facility that explains what every command does, rather I'll point out conversions needed to make it into a batch. In line 1 of the qbasic code, the ":" before "on error" is there to keep Windows 95 from interpreting the statement as "echo on" and writing "echo is on" to the file instead of the errortrap. Dos 6 doesn't have this "feature" but the fix is easy enough. In line 5, the natural form of the comparison would be "if ls1 < la" but that would create an error situation, so the equivalent comparison "if sgn(ls1-la)=1" is used instead. Line 7.. "if not p=1" instead of "if p > 1" (not equivalent but p is never <0 so it works). Line 8.. "if not p+ls1=la" instead of "if p+ls1 < la" (again not equivalent but...).
Intermixing Perl and Batch...
The following was tested using the Perl for Win32 interpreter, it should work with other Perl 5 complient interpreters if there are any others. To be useful, one usually has to make a batch file for each perl script to run, but the language definition allows for extra code before and after the script code. This makes it very easy to make a perl-to-batch "compiler" that encapsulates the script and allows it to run like a stand-alone program...
:: 'compiles' perl scripts into batch files
:: by Terry Newton, Feb 98
@echo off
if .%2==. echo perl2bat perlfile batfile
if .%2==. goto end
if exist %1 goto compile
echo can't find input file %1
goto end
:compile
echo compiling %1 to %2...
echo>%2 @echo off
echo>>%2 set $bat=%%0.bat
echo>>%2 if not exist %%$bat%% set $bat=%%0
echo>>%2 perl -x %%$bat%% %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9
echo>>%2 set $bat=
echo>>%2 goto p2b_end
type %1>>%2
echo>>%2 __END__
echo>>%2 :p2b_end
:end
Up to nine command-line parameters are passed to the script, you can modify the output to include other batch processing that may be needed before and after running the script. Since the batch execution thread never touches the script code there are no limitations on what it contains, so long as it doesn't have a line that begins with ":p2b_end" and I don't think that'll be a problem (if it is edit the two occurences to something else).
How it works... the batch must write out other batch instructions that determine the filename (varies if ran from a command line or from windows) then call the perl interpreter (modify if not "on the path") to run itself using a switch that tells the interpreter to ignore any junk at the beginning. No redirection is needed, so none of those hassles, the only conversion is all the "%" characters in the output are doubled. When written out the loader looks like...
@echo off
set $bat=%0.bat
if not exist %$bat% set $bat=%0
perl -x %$bat% %1 %2 %3 %4 %5 %6 %7 %8 %9
set $bat=
goto p2b_end
[simple perl script]
#!perl
print "Hello World!\n";
__END__
:p2b_end
Neat trick. However it doesn't run from a path directory, for that more batch processing would be necessary. If it becomes too difficult then it's easier just to run with a separate batch...
@echo off
perl c:\whatever\perlscr.pl %1 %2 %3 %4 %5 %6 %7 %8 %9
... and be done with it, even if it is yet another file.
Making decisions based on the output of a program
Often it is necessary to test the output of a program that does not return an errorlevel. The trick is to use the FIND command to search for a specific string in the program's output.
The general method for Dos 6 and above is...
program | find "string" > nul
if errorlevel 1 goto notfound
rem string was found
goto endfind
:notfound
rem string was not found
:endfind
Note - if the letter case of "string" is not known, use find /i "string" instead of find "string".
For checking for more than one string, send the program's output to a temporary file and test that...
program > tempfile
find "string1" < tempfile > nul
if not errorlevel 1 goto 1found
find "string2" < tempfile > nul
if not errorlevel 1 goto 2found
rem no strings found
goto endfind
:1found
rem string1 found
goto endfind
:2found
rem string2 found
:endfind
del tempfile
Dos 5 makes it more complicated, because FIND didn't return an errorlevel until 6. If you're not sure of the target OS a universal approach takes advantage of COPY's refusal to copy empty files...
program | find "string" > temp1
copy temp1 temp2 > nul
del temp1
if not exist temp2 goto notfound
del temp2
rem string found
goto endfind
:notfound
rem string not found
:endfind
Any command or utility that writes to standard out can be used with these methods. A typical example is determining if two files are identical (assumes English, dos 6 or better)...
fc file1 file2 | find "FC: no differences" > nul
if errorlevel 1 goto notequal
rem files are identical
goto donefc
:notequal
rem files are different
:donefc
I've used common names for the temporary files for clarity, but keep in mind that the user might have files with those names which might be overwritten. Better to use cryptic names like [$tmp1$].
--------------------------------------------------------------------------------
Copyright 1998 Terry Newton
Author: Terry Newton
Article mirrored with permission of author. View Original Article.
--------------------------------------------------------------------------------
This is an attempt at explaining the MSDOS batch language. It is not complete, just the basics. For more information on individual commands refer DOS's built-in HELP command. Some familiarity of DOS is assumed, you should already know what directories are and how to use common commands like CD, MD, DEL, RENAME etc.
Table of Contents
Elements of the batch language
Variables
Redirection and Pipes
Labels, Conditions and Branching
Subroutines, CALL and FOR
Launching programs
The path...
Batch for running a virus scanner
Launching Windows 95 programs and associated files
Menus for programs
Simple example game menu
Using menuing systems
Obtaining user input
Batch routine for entering strings
How to set up SHELL and ANSI
Processing Lists of Data
Demo batches for processing subdirectories
Windows 95 considerations
A method with does not use loadfix.com
Creating and running other programs from batch
batch/qbasic string input routine
batch/qbasic global string change utility
intermixing perl and batch
Making decisions based on the output of a program
All of the examples assume English DOS 6, some may run under DOS 5 but don't count on it. DOS 6 adds features which are very useful to batch programmers, like CHOICE and a version of FIND that returns an errorlevel.
--------------------------------------------------------------------------------
Elements of the Batch Programming Language
The best way to learn batch is to experiment while referring to the HELP command, it explains everything. Batch programs are essentially sequences of DOS commands that 'type themselves' when the batch file is run.
Batch files consist of control elements, internal DOS commands and external commands or programs. With a little ingenuity one can duplicate most of the functions of a general purpose language, but doing any kind of math is tricky, there are no arithmetic commands at all. For the types of things batch is used for, this is not much of a problem.
Variables
Batch uses the percentage sign (%) to mark variables. The set command is used to assign and clear variables. When DOS reads the batch file, strings like copy %var1% %var2% will be expanded to read say copy source.fil dest.fil (assuming that's what they're set to) before feeding the line to the command interpreter. %% is reduced to % when interpreted, so the at-the-prompt commandfor %a in (1 2 3) do echo %a has to be written in a batch file as for %%a in (1 2 3) do echo %%a.
Variable names have eight significant characters (I think) and are always stored as upper case (except for the 'windir' variable added by Windows). [Testing under Win95 shows that variable names can be longer than 8 characters and all characters are significant, can't say about Dos 6.] In addition to user-set variables, the entire command line is passed to the batch as the read-only variables %0 to %9. %0 is the actual batch name as typed, the rest are parameters. The shift command moves everything down by one allowing parameters past the ninth to be retrieved (this wipes out the %0 parameter so if used for the batch to call itself it must be saved to another variable).
The following batch illustrates the use of variables...
@echo off
set var1=Hello
set var2=World
echo %var1% %var2%!
set var1=
set var2=
Explanation - the first line prevents the commands from being displayed, the @ in @echo off keeps that line from displaying. The set command is used to set two variables to "Hello" and "World". Next, echo is used to display the two variables to the screen followed by "!" producing the classic Hello World! display. Finally the two variables are cleared to keep them from needlessly consuming environment space.
Speaking of environment, you should specify more space than stock DOS gives you by using a CONFIG.SYS line similar to...
shell=c:\command.com /e:1024 /p
The number after /e: specifies how much space to set aside, usually 1024 is plenty. You can also execute command /e:5000 /c progname if you need a bunch of space. This can be included inside the batch itself. For quickies, especially if you wish to restore all variables to their original state after testing something, just enter command /e:5000. Type exit to quit the command shell and return to the previous environment.
Redirection and Pipes
Normally, input is taken from the keyboard and output goes to the console. Redirection allows input and output to refer to a file or device instead. Pipes allow the output of one program to be used as input to another program. These symbols only work with programs that read from "standard input" and write to "standard output" but fortunately this includes most DOS commands.
The < symbol causes file to be fed to the program as input.
The > symbol causes the program's output to be sent to the following file or device.
The >> symbol causes the program's output to be appended to the file or device.
The | symbol (the pipe) causes the output of the preceding program to be sent to the following program.
The following example shows how to use redirection with the FIND command...
@echo off
find %1<%2>nul
if not errorlevel 1 echo %2 contains %1
If saved as say DOESIT.BAT, entering doesit "Word" text.fil will print text.fil contains "Word" if the file TEXT.FIL contains the string "Word" (at least under DOS 6). Since we're not interested in the actual output of the FIND command, it is redirected to the nul device.
Labels, Conditions and Branching
A label is any line that begins with a colon. Comments in batch code can be made by using a double-colon, this is better than using the REM command because labels are processed before redirection symbols. ::
The goto command is used to transfer control to another part of the batch file. For example...
:: test goto's
@echo off
goto start
*** This text can be anything ***
*** because it will never run ***
:start
echo Done.
The decision mechanism in batch is the if command. It can be used to compare one string to another, determine if a file exists or determine the errorlevel returned by a previous command. If the evaluation is true, the rest of the command is executed. The not modifier reverses the evaluation results. Examples...
if not %var%.==. goto got_var
if exist MYFILE.DAT goto got_file
if errorlevel 5 echo Errorlevel is equal or greater than 5
if not errorlevel 4 echo Errorlevel is less than 4
Notice the periods in the if %var%.==. example, they keep empty variables from producing syntax errors. '%var%. is equal to . only if the string is empty. The way the command is worded it branches to :got_var only if %var% is not empty. Read the wording in the if errorlevel command, any errorlevel equal or greater than 5 is evaluated as true.
Subroutines, CALL and FOR
Most of the elements are in place, but still no subroutines. These can be tackled either by defining a return value and GOTO'ing the routine, which GOTO's to the value of the return variable upon completion. For example...
set return=next1
goto subroutine
:next1
-- bla bla --
goto end
:subroutine
-- bla bla --
goto %return%
:end
A more elegant way is to use a branch at the top of the batch that branches to the subroutine. This can be combined with the for and call commands to perform a sequence of steps. Here is an example that prints the names of files in the current directory matching filespecs on the command line...
@echo off
if %1.==Sub. goto %2
for %%a in (%1 %2 %3 %4 %5) do call %0 Sub printname %%a
goto end
:printname
echo %3
:end
Launching programs
One of the most useful aspects of batch is its ability to set up custom environments for running programs. Here is a typical made-up scenario: Suppose you have a game that requires you to change to say the C:\GAMES\MUT then run the program MUTANT with the command line parameter /NSB. Rather than typing all that, just put it into a batch and place it in a path directory.
The path - this is a list of directories held in the %PATH% variable that DOS uses to find programs without having to specify the directory it's in. For example, the default path in a simple setup might read (from autoexec.bat)...
path C:\DOS;C:\WINDOWS;C:
Each directory is separated by a semicolon. When a command is typed first DOS tries the current directory. If not there it begins searching each directory listed in the path line. It is convenient to place batch files in a path directory. If you haven't done so yet, make the directory C:\BATCH (for example) and add it to the path line, as in...
path C:\DOS;C:\WINDOWS;C:\;C:\BATCH
Any batch file now placed in C:\BATCH can be run from anywhere without having to change directories. Now, back to the mythical example, let's put all of the required commands into a file called say MUTANT.BAT and place it in C:\BATCH (on the path now)...
@echo off
c:
cd \games\mut
mutant /NSB
The first line turns off command echo (contained at the beginning of almost all batch files), the next line ensures the C drive is active, then it changes to the correct directory using the cd command and runs the game with the correct command line parameter.
Here is an example for a virus scanner that does not change the current directory, but instead calls a program in another directory. In this particular example, if the batch is called without parameters defaults are supplied instead...
@echo off
set parm=%1 %2 %3 %4 %5 %6 %7 %8 %9
if %1.==. set parm=. /nomem /sub
c:\scanners\scan\scan.exe %parm%
set parm=
The specific commands, directories and parameters will vary depending on the software and where it is installed. The command line is stored in the variable %parm%, if the first parameter %1 is empty, %parm% is set to a useful default, for SCAN this translates to "scan the current and all subdirectories under it, do not scan memory". If this batch was saved as say SCN.BAT into a path directory (got that C:\BATCH directory yet?) any directory branch may be scanned by just typing SCN instead of having to type the directory\command parameters.
Launching Windows 95 programs and associated files...
Windows 95 has a built-in utility for launching Windows programs and files that are associated with Windows programs directly from batch, a very useful addition! Previously this required special utilities to "bridge the gap". The basic syntax is simple...
start /w filename [command line arguments]
The full filename with directory information must be specified if not in the current directory or on the path, as usual. If filename is a long filename or contains spaces, enclose it in quotes. The /w option causes the batch to wait for the file to be closed before continuing with the batch, otherwise batch processing continues in parallel. Other start options include /m to run minimized and /max to run full screen. For example...
start /w /max "C:\Program Files\Myprogram\readme.txt"
Anything that can be double-clicked to run can be launched with start. One very useful application of this is running Windows files from inside a dos-based zip file viewer like AView that allows different viewers to be set up for various extensions. Here is a general purpose viewer for using with dos programs...
:: RUNAFILE.BAT (for example)
@echo off
start /w %1
Windows will figure out what to launched based on the selected file's extension.
Menus for programs
The CHOICE command that comes with DOS 6 is handy for creating custom menus for DOS programs as well as simple Yes/No questions. Here is a simple menu for a few games...
@echo off
:menu
c:
cd\games
cls
echo GAMES MENU
echo ==========
echo.
echo 1 - Doom
echo 2 - Raptor
echo 3 - FlightSim
echo 4 - Lotus
echo.
echo Q - Quit
choice /c:1234Q>nul
if errorlevel 5 goto done
if errorlevel 4 goto lotus
if errorlevel 3 goto flightsim
if errorlevel 2 goto raptor
if errorlevel 1 goto doom
echo CHOICE missing
goto done
:doom
cd doom
doom
goto menu
:raptor
cd raptor
rap
goto menu
:flightsim
d:
cd\fs4
fs4
goto menu
:lotus
cd lotusdrv
lotus
goto menu
:done
The idea is simple, set up initial conditions, in this case change to the C: drive and the \games directory, print a menu using ECHO commands (use echo. to print a blank line) then run the CHOICE command with the parameter /c:1234Q (the valid choices) and redirect it to >nul so it doesn't mess up the screen. After the user makes a decision, the errorlevel returned depends on which one was picked, selecting Raptor for example returns errorlevel 2. They are listed backwards because "if errorlevel 2 do something" really means "if the errorlevel is 2 or greater do something".
ANSI codes can be used to spruce up menus like these, even decent interfaces can be constructed in color using nothing but batch code. Several menu utility programs are also available that are called from batch.
Using menuing systems...
Several freeware, shareware and commercial menuing programs are available that let you create nice-looking menus for your system. They're not as fun as doing it entirely in batch but they can be more productive.
A more elaborate program is something called GO-MENU from an archive called DOSVAR20 from Pinnacle Software. The shareware program was something for manipulating strings (and was never even run) but GO-MENU.EXE is great. Here is its help screen when run with "/?"...
GO-MENU v1.21A -- Copyright (C) 1991,92 Pinnacle Software (Montreal)
Purpose: Displays a menu of up to 10 items
Author: Tim Campbell (Dial 514-345-9578; GEnie T.CAMPBELL11)
Format: GO-MENU [menu-file-name] [nnn] [save-file-name]
Parms: Specify nnn to save & read last selection
nnn is a save index from 0 to 255
save-file-name is the file that holds up to 256 saves
Program can continue if create or read of save file fails
Defaults: menu-file-name = GO-MENU.MNU
save-file-name = GO-MENU.SAV
Menu File: Line 1 Menu heading
Line 2+ Menu lines
Note: Lines starting with ; are ignored
Returns: 1 - 10 depending on menu selection
200 if user pressed Esc in menu
250 for help request (this display)
255 for program error
Here is an example of how I use it, extracted from my master system batch...
@echo off
--- stuff ---
:menu
c:
cd go-menu user.mnu
if errorlevel 11 goto exit
if errorlevel 10 goto boot1
if errorlevel 9 goto pic
if errorlevel 8 goto tape
if errorlevel 7 goto scanners
if errorlevel 6 goto editfiles
if errorlevel 5 goto sysinfo
if errorlevel 4 goto house
if errorlevel 3 goto setevars
if errorlevel 2 goto prompt
if errorlevel 1 goto windows
goto menu
:windows
win
goto menu
:prompt
command /e:2048
goto menu
--- more menus etc ---
This is the text file USER.MNU to define the menu text...
My Computer System
Run Windows
Run DOS Prompt
Set Environment
HouseKeeping Utilities
System Information
Files / Environment
Scanners
Backup
PIC Menu
Reboot
I have no idea if GO-MENU is freeware, shareware or isn't even supposed to be used but it does work well. You can probably find it in the SimTel archives. Look for "DOSVAR20.ZIP". Many others are available, enough to cause mental overload actually. Some of them can create very elaborate screens once you master their convulted syntax (I haven't...).
Obtaining User Input
The CHOICE command is fine for asking limited-choice questions but it is no-good for getting real strings like a filename. There are two approaches that can be taken - use an external COM file like SENVAR.COM that directly sets a variable entered by the user. Or you can do it completely in batch. I've seen a couple of variations to this technique, one is contained in Dirk Van Deun's Collection of Batch Techniques file. The one I've been using originated from a computer magazine, I've modified it to put the temp files in C:\DOS to avoid accidentally overwriting 'ENTER.BAT'. You might need to change the directory, or just eliminate it altogether.
@echo off
:: based on batch from PC Magazine June 27, 1995 page 248
:: this version puts temps in C:\DOS dir and shortens var names
:: User input is returned in variable STR
:input
> C:\DOS\en#er.bat fc con nul /lb1 /n|date|find " 1: "
> C:\DOS\enter.bat echo set str=
>>C:\DOS\enter.bat echo :loop
>>C:\DOS\enter.bat echo if not '%%str%%==' set str=%%str%% %%5
>>C:\DOS\enter.bat echo if '%%str%%==' set str=%%5
>>C:\DOS\enter.bat echo shift
>>C:\DOS\enter.bat echo if not '%%5==' goto loop
call en#er.bat
del C:\DOS\enter.bat
del C:\DOS\en#er.bat
Simply "call input.bat" (assuming that's what it's named) and the user string is returned in the %str% variable. If this routine is included in the batch program itself, set a return variable and call it like a subroutine as in...
echo Enter filename...
set return=here
goto input
:here
echo You entered %str%
set return=
goto done
:: above input routine
:input
:: ...
goto %return%
:done
A simpler way to call it is to use a universal branch at the top of the batch...
@echo off
if .%1==.Loop goto %2
then when you want input do a...
echo Enter filename...
call %0 Loop input
:: filename in %str%
When using batch input routines, do not enter redirection symbols or other stuff that messes up DOS, especially < > and |.
How to set up SHELL and ANSI
To use batch effectively you should check your CONFIG.SYS file for proper settings. To use color you need something like:
DEVICE=C:\DOS\ANSI.SYS
or if UMBs are available (have a DOS=HIGH,UMB line) use:
DEVICEHIGH=C:\DOS\ANSI.SYS
If this line is not present add it with the other DEVICE's, might help if it's first but that probably doesn't matter. When ANSI.SYS is active it interprets escape codes that set screen colors, move the cursor and all kinds of useful things. Type in HELP ANSI.SYS at a dos prompt for a detailed list of the available commands.
Among the commands is the ability to re-define any key to output an entire sequence of keys and commands upon typing the file. Files containing these sequences are known as Key Macros or ANSI Bombs, depending on the commands they contain. I use key macros to redefine my function keys to useful dos commands. I am very used to hitting control-x instead of typing E X I T Return. Just be aware of the potential problem and don't TYPE strange files. Use something like LIST. Other versions of ANSI are available that do not allow key redefinition if this makes you nervous. ThunderByte's anti-virus driver will also prevent key redefinition after it's called, just define what you want defined before calling TBDRIVER.
To prevent out-of-environment errors when running batch files you should also have a SHELL statement in CONFIG.SYS to specify a larger-than-normal environment, something like:
shell=c:\command.com /e:1024 /p
Some computers have COMMAND.COM only in the DOS directory, if there is no COMMAND.COM in the root change 'c:\command.com' to 'c:\dos\command.com' or wherever it is. If a 'set comspec=c:\command.com' line is present it should match the path\filename given in the shell command.
--------------------------------------------------------------------------------
Processing Lists of Data
A nagging problem in batch programming is how to take a list of items in a file and do anything useful with it. One solution is to use Ed Schwartz' @.COM program or a similar external utility, but there is a way to do it entirely with batch if certain precautions are taken.
The trick is to take the Dos file LOADFIX.COM and copy it to the filename ENTER.COM then use the DATE command to read the data file and output it as a batch. LOADFIX is a seldom-used command that simply loads and runs program above the first 64K of memory. It doesn't seem to have many uses as intended, but since it merely runs its parameters and it's a COM file it can be very useful for data processing from batches since it can simulate a call command without using 'CALL'. How is this useful? The DATE command outputs the string 'Enter new date (mm-dd-yy): ' then waits for input. If the input is not a valid date, it re-displays the prompt and gets more input until either a valid date or an empty line is entered. This has the effect of prepending 'Enter new date (mm-dd-yy): ' in front of each line of an input file. If LOADFIX were renamed to ENTER then each line will attempt to run NEW and whatever was in the original list shows up as parameter %3 and up. The obvious disadvantage of this technique is the input list cannot contain a valid date! Other than that it looks like a very promising technique.
The following demo batch creates a list of subdirectories then processes the list one item at a time...
:: demo - process subdirectories - by Terry Newton
:: overwrites ENTER.COM DIRFILE$ DIRFILE$.BAT NEW.BAT
@echo off
:: check and branch to subroutine
if .%1==.DoDir goto DoDir
:: prepare ENTER.COM file (change c:\dos\ if different)
copy c:\dos\loadfix.com enter.com > nul
:: prepare a list of fully qualified subdirectories
dir /s /ad /b > dirfile$
:: add a blank line to the end so DATE will exit
echo.>>dirfile$
:: run each line through date to make the list-batch
type dirfile$|date|find "Enter" > dirfile$.bat
:: get rid of the original list
del dirfile$
:: prepare NEW batch to call main program for
:: each item of the list
echo @echo off > new.bat
echo %0 DoDir %%3 >> new.bat
:: now call the list-processing batch
call dirfile$.bat
:: delete the temp files and get out
del dirfile$.bat
del enter.com
del new.bat
goto done
:: This subroutine is called by NEW.BAT for each item
:: in the list plus the blank line at the end
:DoDir
if .%2==. goto done
:: here for each subdirectory with name in %2
echo Looking at subdirectory %2...
::
:done
Be sure that you do not have a NEW.BAT or ENTER.COM program in the current directory, they will be overwritten. In the above example, the DIR /S switch ensures that no item will be a valid date, but if /S were omitted there would be a chance a directory name might just happen to also be a date and cause your system date to be set incorrectly, so be careful when using this technique.
Examples of this technique...
RESETARC.BAT and RESETALL.BAT are a couple of batch files I made for dealing with a tape backup program that doesn't reset the archive attributes on the files it backs up. Yuk! RESETARC resets the archive bits on files in the current directory and all subdirectories below it, RESETALL resets the archive bits on every file on every drive (edit for your system). Although that's an oddball kind of function they make simple templates to use for doing other oddball functions in every directory, just substitute your commands in place of the attrib command.
DIZZY.BAT builds a file containing the contents of all FILE_ID.DIZ files in and under a specified directory. I never knew I had so much stuff!
Windows 95 considerations...
The subroutine demos will work under Windows 95 provided a compatible loadfix.com exists and can be found, and no long directory names are involved. Windows 95 leaves out many old dos commands including loadfix.com, if you haven't already, look for them at Microsoft's site or on the install CD. The main 95 difference for these batches is the /b switch of the DIR command outputs long names, an advantage or disadvantage depending on the application. Most dos commands can handle long filenames (provided they're enclosed by quotes) so if copying or other simple tasks it's no problem. If running an old dos app that does not understand long filenames then about all that can be done is copy the target file to another file first then call the dos app on the shorter name. I have no trick long-to-short name routines but I'm sure it can be done.
The demo code conversions are not too bad, at least for the first six spaces. The main difference is as many parms possible are passed in the code that calls the subroutine, and the subroutine reconstructs the parms into a variable containing the directory name.
:: demo - process subdirectories - by Terry Newton
:: overwrites ENTER.COM DIRFILE$ DIRFILE$.BAT NEW.BAT
:: windows 95 compatible
@echo off
:: check and branch to subroutine
if .%1==.DoDir goto DoDir
:: prepare ENTER.COM file (looks in 2 places, hardcode if different)
if exist c:\dos\loadfix.com copy c:\dos\loadfix.com enter.com>nul
if exist c:\windows\command\loadfix.com copy c:\windows\command\loadfix.com enter.com>nul
:: prepare a list of fully qualified subdirectories
dir /s /ad /b > dirfile$
:: add a blank line to the end so DATE will exit
echo.>>dirfile$
:: run each line through date to make the list-batch
type dirfile$|date|find "Enter" > dirfile$.bat
:: get rid of the original list
del dirfile$
:: prepare NEW batch to call main program for
:: each item of the list
echo @echo off > new.bat
echo %0 DoDir %%3 %%4 %%5 %%6 %%7 %%8 %%9>> new.bat
:: now call the list-processing batch
call dirfile$.bat
:: delete the temp files and get out
del dirfile$.bat
del enter.com
del new.bat
goto done
:: This subroutine is called by NEW.BAT for each item
:: in the list plus the blank line at the end
:DoDir
if .%2==. goto done
:: here for each subdirectory
set dirname=
:DoDirparms
set dirname=%dirname%%2
if .%3==. goto DoDirgotit
set dirname=%dirname% % nullmarker%
shift
goto DoDirparms
:DoDirgotit
echo Looking at subdirectory %dirname%...
::
:done
List processing without loadfix...
Having to locate a possibly non-existent loadfix.com is a hassle to say the least, especially these days. If the list isn't very large and processing time isn't critical, there is another way to work through a list using only common dos commands. The technique is to create a list ending with a blank line, run through date to create a temp batch, so far just like the previous method but instead of creating enter.com, create an enter.bat that sets the variable. When the temp batch runs, only the first enter line will execute, so after it returns use the find /v command to remove the last item processed, then loop until the empty line is encountered. Each item takes a bit longer to process because of the removal step, but in applications where an appreciable time is spent on each item, this doesn't matter much, better to have the simplicity.
A demo that collects and appends all .DIZ files in and below a directory into a single file...
:: find all .DIZ files in and below current directory
:: and append them into a single DIZFILES.TXT file.
:: coded by Terry Newton
@echo off
:: branch if need be
if .%1==.DoFile goto dofile
:: empty the output file
rem > dizfiles.txt
:: create a list of files (/-p in case pause in dircmd)
dir /s /b /-p *.DIZ > lstfile$
:: end with blank line
echo.>> lstfile$
:: run through date to make tempbat
type lstfile$ | date | find "Enter" > lstfile$.bat
:: create an enter.bat to be run by listfile$.bat
echo %0 DoFile %%4 %%5 %%6 %%7 %%8 %%9 > enter.bat
:loop
:: run temp batch
lstfile$.bat
:: ends up here with filename at parm2 and up
:dofile
:: check for exit condition
if .%2==. goto done
:: derive filename from parms
:: (only needed for long names, otherwise refer to %2)
set fname=
:doparms
set fname=%fname%%2
if .%3==. goto gotparms
set fname=%fname% % nullmarker%
shift
goto doparms
:gotparms
:: give operater something to look at
echo Working on %fname%...
:: add filename and file to output file
>> dizfiles.txt echo -------- %fname% --------
>> dizfiles.txt type "%fname%"
>> dizfiles.txt echo.
>> dizfiles.txt echo.
:: done with that file, so remove entry from lstfile$.bat
type lstfile$.bat | find /v "%fname%" > lstfile$.bat
:: and loop
goto loop
:done
:: finished, remove temp files
del enter.bat
del lstfile$.bat
del lstfile$
This demo incorporates Windows-95 compatibility fixes, if your application does not have filenames with spaces in them several lines of code can be saved, so if using Windows 3.1 or Dos, make the "dofile" part like this instead...
:dofile
:: check for exit condition
if .%2==. goto done
:: give operater something to look at
echo Working on %2...
:: add filename and file to output file
>> dizfiles.txt echo -------- %2 --------
>> dizfiles.txt type %2
>> dizfiles.txt echo.
>> dizfiles.txt echo.
:: done with that file, so remove entry from lstfile$.bat
type lstfile$.bat | find /v "%2" > lstfile$.bat
:: and loop
goto loop
Not totally sure (never tried it..) but the quotes around possibly long filenames will probably confuse older doses, something else to watch out for if making batch code that must run on multiple dos versions. One thing for sure, without the quotes it fails under 95 with a "too many parameters" error the first time a space is encountered in a filename.
In all of these demos, lists of filenames are used but the list does not have to be that, it can be a list of anything so long as only the last line is empty and no redirection characters (< > | ) or separators (; , = ) involved. Redirection not enclosed by quotes create errors and unpredictibly-named files, separators are converted to spaces. However processing lists of filenames does seem to be the obvious use.
--------------------------------------------------------------------------------
Creating and running other programs from batch
Often times batch simply is not powerful enough or too slow to do the things that need to be done, this is when other program interpreters like QBasic and even debug can come in very handy. Using debug and assembly code in general is beyond the scope of this text and me also, I learn a few commands and work with them. QBasic isn't hard to learn though, and you do not need to learn everything to be able to use it from batch files. Reading and writing files, doing some mathematical computations (but read on), fancy screen displays and interfaces and many other cool tricks can be accomplished using batch code that writes and runs temporary basic programs. If you look around my batch site you'll find many examples.
User input? The all-batch solution is ok but here's another way...
@echo off
echo>$inp$.bas bad$="<|>=,;":on error goto done
echo>>$inp$.bas ? "Enter something: ";
echo>>$inp$.bas line input a$:if a$="" goto wrbat
echo>>$inp$.bas for i=1 to len(bad$)
echo>>$inp$.bas if not instr(a$,mid$(bad$,i,1))=0 then a$="(error)"
echo>>$inp$.bas next i
echo>>$inp$.bas wrbat:open "$inp$.bat" for output as #1
echo>>$inp$.bas ? #1,"set input=";a$
echo>>$inp$.bas done:close #1:system
qbasic /run $inp$.bas
call $inp$.bat
del $inp$.ba?
echo You entered %input%
How it works... the batch code writes out a temporary basic program and runs it, the basic code prints a prompt, collects a line of user input, checks it for characters that can cause errors and replaces the input line with "(error)" if present, then writes a temporary batch that sets a variable to the input line. After the basic completes, the batch calls the temp batch to set the input variable, deletes the temp files and displays the input variable.
Ok a couple of further explorations... first off if you haven't figured it out, dos doesn't care much where redirection occurs in a command, it makes things look neater if the redirection is immediately after the echo so the remainder resembles what actually gets written, handy anytime creating files with batch but leave "echo." as "echo.>>file". Writing out strings that contain redirection symbols is not a problem, the quotes hide them from dos. The main trick is avoiding errors from < and > characters in math expressions. Fortunately just about any math equation using such characters can be rewritten with not and sgn to avoid the problem. For example, if a > b then... won't work, instead use something like if sgn(a-b)=1 then... In the input example it wasn't if instr(...)<>0 but rather if not instr(...)=0.
Some more basic to batch conversions...
if a < 5 then... if sgn(5 - a) = 1 then...
if a <> 5 then... if not a = 5 then...
if a <= b then... if not sgn(a - b) = 1 then...
When writing any file from batch (this applies to batch, qbasic or anything) the cardinal rules are %% becomes %, variables are substituted with their contents, and the characters < > and | must be enclosed in quotes or not used at all.
Here is another useful newly hacked-out example of using qbasic from batch...
:: CHSTRING.BAT - changes all occurences of one string to
:: another, if newname is not specified overwrites filename
:: under win 95 strings can contain spaces and separators
:: requires at least dos 6 and qbasic.exe
@echo off
:: verify that it has enough parms
if .%3==. echo CHSTRING "matchstring" "newstring" filename [newname]
if .%3==. goto end
:: verify that file is present
if exist %3 goto fileok
echo file %3 not found
goto end
:fileok
:: verify quotes
echo %1|find """">nul
if errorlevel 1 echo no quotes around string(s)
if errorlevel 1 goto end
echo %2|find """">nul
if errorlevel 1 echo no quotes around string(s)
if errorlevel 1 goto end
:: create a custom qbasic program
echo>chstr$$.bas :on error goto done
echo>>chstr$$.bas ls1=len(%1):open "%3" for input as #1
echo>>chstr$$.bas open "newfl$$$" for output as #2
echo>>chstr$$.bas doit:line input #1,a$:if a$="" goto wline
echo>>chstr$$.bas chline:la=len(a$):if sgn(ls1-la)=1 goto wline
echo>>chstr$$.bas b$="":c$="":p=instr(a$,%1):if p=0 goto wline
echo>>chstr$$.bas if not p=1 then b$=left$(a$,p-1)
echo>>chstr$$.bas if not p+ls1=la then c$=right$(a$,la-p-ls1+1)
echo>>chstr$$.bas a$=b$+%2+c$:goto chline
echo>>chstr$$.bas wline:print #2,a$:goto doit
echo>>chstr$$.bas done:close #1:close #2:system
:: run and delete it
qbasic /run chstr$$.bas
del chstr$$.bas
:: move output to appropriate filename
if not .%4==. move newfl$$$ %4>nul
if .%4==. move newfl$$$ %3>nul
:end
How it works... (I hate this part:) The initial batch lines verify the parameters for correctness and if not display various messages. Once it's satisfied with the parms it creates a temporary qbasic program that changes all occurences of "match string" to "new string", writing the results to a temp file. After running and deleting the qbasic program, it checks to see if an output filename was specified, if so it copies the temp output file to that otherwise overwrites the specified file with the changes.
The strings must be enclosed in quotations, under Windows 95 they can contain spaces and separators like commas, under Dos 6 the strings must be all one word without any strange characters, sorry... another Win95 difference, but I like this one. A related feature is specifying long filenames using quotes, many lfn-unaware batches still work if the filenames are quoted to keep the parameters intact.
This is a batch guide, not a qbasic guide so I won't explain the basic part much, qbasic has an extensive on-line help facility that explains what every command does, rather I'll point out conversions needed to make it into a batch. In line 1 of the qbasic code, the ":" before "on error" is there to keep Windows 95 from interpreting the statement as "echo on" and writing "echo is on" to the file instead of the errortrap. Dos 6 doesn't have this "feature" but the fix is easy enough. In line 5, the natural form of the comparison would be "if ls1 < la" but that would create an error situation, so the equivalent comparison "if sgn(ls1-la)=1" is used instead. Line 7.. "if not p=1" instead of "if p > 1" (not equivalent but p is never <0 so it works). Line 8.. "if not p+ls1=la" instead of "if p+ls1 < la" (again not equivalent but...).
Intermixing Perl and Batch...
The following was tested using the Perl for Win32 interpreter, it should work with other Perl 5 complient interpreters if there are any others. To be useful, one usually has to make a batch file for each perl script to run, but the language definition allows for extra code before and after the script code. This makes it very easy to make a perl-to-batch "compiler" that encapsulates the script and allows it to run like a stand-alone program...
:: 'compiles' perl scripts into batch files
:: by Terry Newton, Feb 98
@echo off
if .%2==. echo perl2bat perlfile batfile
if .%2==. goto end
if exist %1 goto compile
echo can't find input file %1
goto end
:compile
echo compiling %1 to %2...
echo>%2 @echo off
echo>>%2 set $bat=%%0.bat
echo>>%2 if not exist %%$bat%% set $bat=%%0
echo>>%2 perl -x %%$bat%% %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9
echo>>%2 set $bat=
echo>>%2 goto p2b_end
type %1>>%2
echo>>%2 __END__
echo>>%2 :p2b_end
:end
Up to nine command-line parameters are passed to the script, you can modify the output to include other batch processing that may be needed before and after running the script. Since the batch execution thread never touches the script code there are no limitations on what it contains, so long as it doesn't have a line that begins with ":p2b_end" and I don't think that'll be a problem (if it is edit the two occurences to something else).
How it works... the batch must write out other batch instructions that determine the filename (varies if ran from a command line or from windows) then call the perl interpreter (modify if not "on the path") to run itself using a switch that tells the interpreter to ignore any junk at the beginning. No redirection is needed, so none of those hassles, the only conversion is all the "%" characters in the output are doubled. When written out the loader looks like...
@echo off
set $bat=%0.bat
if not exist %$bat% set $bat=%0
perl -x %$bat% %1 %2 %3 %4 %5 %6 %7 %8 %9
set $bat=
goto p2b_end
[simple perl script]
#!perl
print "Hello World!\n";
__END__
:p2b_end
Neat trick. However it doesn't run from a path directory, for that more batch processing would be necessary. If it becomes too difficult then it's easier just to run with a separate batch...
@echo off
perl c:\whatever\perlscr.pl %1 %2 %3 %4 %5 %6 %7 %8 %9
... and be done with it, even if it is yet another file.
Making decisions based on the output of a program
Often it is necessary to test the output of a program that does not return an errorlevel. The trick is to use the FIND command to search for a specific string in the program's output.
The general method for Dos 6 and above is...
program | find "string" > nul
if errorlevel 1 goto notfound
rem string was found
goto endfind
:notfound
rem string was not found
:endfind
Note - if the letter case of "string" is not known, use find /i "string" instead of find "string".
For checking for more than one string, send the program's output to a temporary file and test that...
program > tempfile
find "string1" < tempfile > nul
if not errorlevel 1 goto 1found
find "string2" < tempfile > nul
if not errorlevel 1 goto 2found
rem no strings found
goto endfind
:1found
rem string1 found
goto endfind
:2found
rem string2 found
:endfind
del tempfile
Dos 5 makes it more complicated, because FIND didn't return an errorlevel until 6. If you're not sure of the target OS a universal approach takes advantage of COPY's refusal to copy empty files...
program | find "string" > temp1
copy temp1 temp2 > nul
del temp1
if not exist temp2 goto notfound
del temp2
rem string found
goto endfind
:notfound
rem string not found
:endfind
Any command or utility that writes to standard out can be used with these methods. A typical example is determining if two files are identical (assumes English, dos 6 or better)...
fc file1 file2 | find "FC: no differences" > nul
if errorlevel 1 goto notequal
rem files are identical
goto donefc
:notequal
rem files are different
:donefc
I've used common names for the temporary files for clarity, but keep in mind that the user might have files with those names which might be overwritten. Better to use cryptic names like [$tmp1$].
--------------------------------------------------------------------------------
Copyright 1998 Terry Newton
History of Microsoft Windows and MS-DOS
Author: TACKtech Corp.
1975
11/29/1975 "Micro-soft" name used by Bill Gates in a letter to Paul Allen.
11/26/1976 The tradename "Microsoft" is registered.
08/25/1980 Microsoft XENIX OS was announced. XENIX was an enhanced version id the UNIX operating system.
--/--/1981 Microsoft began work on Windows (originally termed the Interface Manager)
08/12/1981 MS-DOS 1.0 shipped with the new IBM Personal Computer
03/--/1983 MS-DOS 2.0 shipped
11/10/1983 Microsoft Windows was announced
11/--/1984 MS-DOS 3.1 is available
11/20/1985 Microsoft Windows 1.0 released
(It was pathetic compared to Apple's Macintosh. It's interface the looked similar to DOS Shell. It contained a few Windows Applications which were able to be cooperatively multitasked.)
04/--/1986 MS-DOS 3.2 ships
1987
04/02/1987 Microsoft Operating System/2 (MS OS/2) announced, as part of a joint agreement between Microsoft and IBM.
04/02/1987 MS-DOS 3.3 announced.
04/02/1987 Microsoft Windows 2.0 announced.
04/02/1987 Microsoft Windows/386 announced.
It was designed to take advantage of the Intel 80386.
Fall/--/1987 Microsoft Windows 2.0 was introduced.
This new version added overlapping windows. PIF files (These told Windows how a DOS application should be run) were added to Windows 2.0.
Late/--/1987 Microsoft Windows/386 released.
Multiple DOS virtual machines was added which allowed the running of multiple DOS applications at the same time in extended memory.
Late/--/1987 Microsoft renamed Windows 2.1 to Win/286.
1988 http://www.tacktech.com
06/28/1988 Microsoft Windows/286 and Windows/386 versions 2.1 announced
07/--/1988 MS-DOS 4.0 released
10/31/1988 David Cutler, formerly of Digital and now working for Microsoft, begins work on Windows NT.
11/--/1988 MS-DOS 4.01 shipped to correct 4.0 problems
1990 http://www.tacktech.com
04/09/1990 Microsoft MS-DOS 4.01 (Russian Version) introduced
05/22/1990 Microsoft releases Windows 3.0. First version of Windows to allow use of memory beyond 640Kb, up to 16MB of RAM with 386 enhanced mode, support for color palettes with more than 16 colors, hierarchical menus, "Program Manager" and "File Manager", private INI files, network support, and API support for combo boxes.
(Over 10 million copies of Microsoft Windows were sold.)
1991 http://www.tacktech.com
10/--/1991 Windows NT is displayed publicly at a demo at COMDEX.
10/20/1991 Microsoft Windows 3.0 with Multimedia Extensions released
06/--/1991 MS-DOS 5.0 shipped. This was the first version of MS-DOS that featured a retail upgrade.
1992 http://www.tacktech.com
04/06/1992 Microsoft Windows 3.1 was released.
TrueType scalable fonts support, Object Linking and Embedding (OLE), mouse trails, and API multimedia and networking support were added.
10/11/1992 Microsoft Windows NT beta program shipped
10/27/1992 Microsoft Windows for Workgroups 3.1 released. It added easier, integrated networking.
1993 http://www.tacktech.com
03/--/1993 Microsoft Windows NT 3.1 Beta
03/30/1993 MS-DOS 6.0 upgrade shipped.
This version included DoubleSpace
05/24/1993 Microsoft Window NT formally launched. It was scheduled for release in 60 days.
06/--/1993 Microsoft begins the development of the successor to Windows 3.x which will later be title Windows 95 (code-named Chicago")
08/--/1993 Microsoft Windows NT 3.1 released after five years in development. It consists of over 6 million lines of code.
11/--/1993 MS-DOS 6.2 released.
11/08/1993 Microsoft Windows for Workgroups 3.11 was shipped.
This version corrected some network-related problems.
1994 http://www.tacktech.com
03/02/1994 MS-DOS 6.21 ships with drive compression removed due to a law suit.
04/11/1994 MS-DOS 6.22 ships with new DriveSpace drive compression.
Q1/--/1994 Microsoft is planing to release a new version Windows the second half of 1994.
09/06/1994 Microsoft Windows NT 3.5 (code-named Daytona") released. It consists of over 9 million lines of code.
09/08/1994 Microsoft Windows 95 becomes the official name of the new version of Windows code-named "Chicago".
1995 http://www.tacktech.com
06/--/1995 Microsoft Windows NT 3.51 released. Minor release is to support upcoming Windows 95 programs.
08/24/1995 Microsoft Windows 95 released. It include MS-DOS 7.0 v4.00.950
The upgrade consisted of 17cabs. The full version had 28 cabs.
12/--/1995 Microsoft Windows code-named "Nashville" v4.10.999
This was often referred to as Windows 96. It was never release. Windows 98 later included it's features.
1996 http://www.tacktech.com
08/24/1996 Microsoft Windows NT 4.0 released. It consists of over 16 million lines of code.
09/--/1996 Microsoft Windows 95 SR2 released v4.00.950B or v4.00.1111
Microsoft Windows 95 is scheduled for a major overhaul in 1997, code-named Memphis (Windows 98 1st ED).
11/--/1996 Microsoft Windows CE 1.0 released, supporting handheld-PCs
12/--/1996 Microsoft Windows 95 SR2.1
1MB supplement for SR2 named usbsupp.exe. Partial USB support includes host controller and hub drivers, and the HID and Imaging classes. AGP support. Recommended for SR2 users wanting USB.
12/--/1996 Microsoft Windows 95 code-named Detroit (SR3) v4.10.1525.3
This development line attempted to give Windows 95 integrated Internet components. It buggy and unstable. The planned release was Dec. 1996. Microsoft scraped it.
1997 http://www.tacktech.com
07/--/1997 Microsoft Windows 98 (Beta 1), code-named "Memphis" released. v4.10.1525.3 (Also, referred to as Windows 9x and Windows 97) Consisted of 47 cabs with IE4 build 4.71.0913.5. NT kernel and speedier registry handling. Curiously, the version# lines up with W96 (4.10.999). Included Winsock2, multiple display support, a DVD player, DirectX5, USB support, Memphis specific Tweak UI additions, System Optimizer, System Troubleshooter and TV listings software (MS CDF).
09/27/1997 Microsoft Windows NT 5.0 (Beta 1) released. Later known as Windows 2000
11/--/1997 Microsoft Windows CE 2.0 released
12/--/1997 Microsoft Windows SR2.5 v4.00.950C
OEM only release. Mostly identical to SR2, but adds SR2.1 USB/AGP update along with IE4 and DirectX 5. Contained the second USB supplement.
12/--/1997 Microsoft Windows NT 4.0 Option Pack released
1998 http://www.tacktech.com
06/25/1998 Microsoft Windows 98 released. v4.10.1998.6
Consisted of 69 cabs with IE4 version 4.72.3110. Features: Some NT kernel and speedier registry handling, FAT32.
07/--/1998 Microsoft Windows CE 2.1 released, supporting palm-sized PCs
08/20/1998 Microsoft Windows NT 5.0 (Beta 2) released (code-named "Cairo)
10/27/1998 Microsoft announces that Windows NT 5.0 will be renamed "Windows 2000"
12/16/1998 Microsoft Windows 2000 (RC0) release
1999 http://www.tacktech.com
01/--/1999 Microsoft Windows 98 SP1 (Beta 1) v4.10.2120
Contains Internet Explorer 5 & DX6.1 Delay of beta 2 caused by bugs in IE5 and a memory leak. Microsoft discontinued SP1 in favor a smaller 41MB patch. Microsoft thought it too big for downloading. Microsoft may release an upgrade CD (SP1) which it would sell for a nominal price from it's Webster.
04/29/1999 Microsoft Windows 2000 (Beta 3) released v5.00.2031
05/05/1999 Microsoft Windows 98 SE (second edition) released v4.10.2222.
Contained bug fixes, security fixes, Internet Explorer 5 & DirectX6.1 Also, new functionality and hardware capabilities were added.
07/02/1999 Microsoft Windows 2000 (RC1) released
07/23/1999 Microsoft Windows Millennium Developer Preview 1 released
07/26/1999 Microsoft Windows Millennium Offically Announced
08/--/1999 Microsoft Windows 98 SE update CD available. This CD will upgrade your Windows 98 4.10.1998 to Second Edition. You can order it from Microsoft. (The Windows 98 Customer Service Pack CD just fixes bugs and Y2K issues, )
08/25/1999 Microsoft and Compaq discontinue all Windows NT/2000 development for the Alpha processor
09/15/1999 Microsoft Windows 2000 (RC2) released build 2128
09/23/1999 Microsoft Windows Millennium (Beta 1) - build 4.90.2380.2
Windows Millennium Beta 1 - TechNet Dec. 1999
Build 4.90.2380
IE 5.50.3723.1301 56-bit cipher
OE 5.00.2919.5600
Explorer 5.50.3723.1301
Media Player: 7.00.00.0093
File Dates 09/20/1999 10:00AM
CD Label: WinMil B1
Files on CD Date: 09/22/1999 12:20PM
11/11/1999 Microsoft Windows 2000 (RC3) released v5.00.2183
11/23/1999 Microsoft Windows Millennium (Beta 2) - build 4.90.2419.5
Windows Millennium Beta 2 - TechNet Jan. 2000
Build 4.90.2419
IE 5.50.3825.1300 56-bit cipher
OE 5.50.3825.400
Explorer 5.50.3825.1300
Meda Player: 6.4.07.1028
File Dates 11/17/1999 05:00PM
CD Label: WinMil Beta
Files on CD Date: 11/17/1999 05:00PM
Folder on CD Dates: 11/17/1999 05:00PM
Included CD Sampler
12/15/1999 Microsoft Windows 2000 RTM released (i.e., coding completed)
12/--/1999 Microsoft Windows Whistler build 5.01.xxxx (Later Windows.NET)
Microsoft had three Windows consumer version development lines running. Windows Neptune was the codename for the operating system to follow Windows ME. Windows Odyssey was yet another OS that would follow Windows Neptune. Both have since been cancelled in favor of Whistler which will the first consumer version of the NT code.
2000 http://www.tacktech.com
01/19/2000 Microsoft Windows 2000 MSDN released
01/20/2000 Microsoft Windows Millennium (Beta 2 refresh) - build 2452
02/10/2000? Microsoft Windows Whistler build 5.01.2200
02/17/2000 Microsoft Windows 2000 Professional, Server, and Advanced Server released. v5.00.2195
02/18/2000 Microsoft Windows Millennium - build 2470
02/25/2000 Microsoft Windows Millennium - build 2476
03/--/2000 Microsoft Blackcomb is now being developed which will be the follow up to Whistler .
03/03/2000 Microsoft Windows Millennium - build 2481
03/10/2000 Microsoft Windows Millennium - build 2487
03/17/2000 Microsoft Windows Millennium - build 2491
03/27/2000 Microsoft Windows Millennium - build 2499
03/20/2000? Microsoft Windows Whistler build 5.01.2211.1 leaked on the Web
03/30/2000 Microsoft Windows Millennium - build 2499.3
04/07/2000 Microsoft Windows Millennium (Beta 3) - build 2499.7 completed
04/11/2000 Microsoft Windows Millennium (Beta 3) - build 2499.7 released
Windows Millennium Beta 3 - TechNet Jun. 2000
Build 4.90.2499
IE 5.50.4030.2400 128-bit cipher
OE 5.50.4029.2901
Explorer 5.50.4030.2400
Meda Player: 7.00.00.1153
File Dates 04/04/2000 05:00PM
CD Label: WinMEB3
Files on CD Date: 04/04/2000 10:00AM
Folder on CD Dates: 05/11/2000 3:47PM 3:47PM 3:34PM 3:40PM 3:41PM 4:11PM
Included CD Sampler
04/18/2000 Microsoft Windows Millennium - build 2509
04/21/2000 Microsoft Windows Millennium - build 2513
04/25/2000 Microsoft showcased 'Whistler' at the Windows Hardware Engineering Conference (WinHEC)
04/26/2000? Microsoft Windows Whistler build 5.01.2XXX leaked on the Web
04/28/2000 Microsoft Windows Millennium - build 2516
05/09/2000 Microsoft Windows Millennium Edition (RC0) - build 2525
05/17/2000 Microsoft Windows Millennium Edition (RC1) - build 2525.6
06/06/2000? Microsoft Windows Millennium Edition (RC2) - build 2535
06/18/2000? Microsoft Windows Millennium Edition when gold (v4.90.3000.2)
Internet Explorer 5.5 is included. New Icons and color scheme like those found in Windows 2000.
Microsoft Windows Whistler Build 2223.1
07/11/2000 Microsoft Windows Whistler Build 2250
07/31/2000 Microsoft Windows 2000 SP1 released
08/31/2000 Microsoft Windows 2001, code-named "Whistler" invites sent to previous beta testers. It is rumored the build 2257 of the Personal and Professional releases are bugged so they will sent the internal, Washington. This feature is currently not included in the Server and Advanced Server versions.
09/14/2000 Microsoft Windows ME to be offically released
10/01/2000 Microsoft Whistler Beta1
12/06/2000 Microsoft Whistler Beta2
2001 http://www.tacktech.com
02/14/2001 Microsoft Whistler RC1
03/21/2001 Microsoft Whistler RC2
04/18/2001 Microsoft Whistler Final Build
2003 http://www.tacktech.com
03/28/2003 Microsoft Releases Windows XP 64-Bit Edition Version 2003 to Manufacturing
Author: TACKtech Corp.
1975
11/29/1975 "Micro-soft" name used by Bill Gates in a letter to Paul Allen.
11/26/1976 The tradename "Microsoft" is registered.
08/25/1980 Microsoft XENIX OS was announced. XENIX was an enhanced version id the UNIX operating system.
--/--/1981 Microsoft began work on Windows (originally termed the Interface Manager)
08/12/1981 MS-DOS 1.0 shipped with the new IBM Personal Computer
03/--/1983 MS-DOS 2.0 shipped
11/10/1983 Microsoft Windows was announced
11/--/1984 MS-DOS 3.1 is available
11/20/1985 Microsoft Windows 1.0 released
(It was pathetic compared to Apple's Macintosh. It's interface the looked similar to DOS Shell. It contained a few Windows Applications which were able to be cooperatively multitasked.)
04/--/1986 MS-DOS 3.2 ships
1987
04/02/1987 Microsoft Operating System/2 (MS OS/2) announced, as part of a joint agreement between Microsoft and IBM.
04/02/1987 MS-DOS 3.3 announced.
04/02/1987 Microsoft Windows 2.0 announced.
04/02/1987 Microsoft Windows/386 announced.
It was designed to take advantage of the Intel 80386.
Fall/--/1987 Microsoft Windows 2.0 was introduced.
This new version added overlapping windows. PIF files (These told Windows how a DOS application should be run) were added to Windows 2.0.
Late/--/1987 Microsoft Windows/386 released.
Multiple DOS virtual machines was added which allowed the running of multiple DOS applications at the same time in extended memory.
Late/--/1987 Microsoft renamed Windows 2.1 to Win/286.
1988 http://www.tacktech.com
06/28/1988 Microsoft Windows/286 and Windows/386 versions 2.1 announced
07/--/1988 MS-DOS 4.0 released
10/31/1988 David Cutler, formerly of Digital and now working for Microsoft, begins work on Windows NT.
11/--/1988 MS-DOS 4.01 shipped to correct 4.0 problems
1990 http://www.tacktech.com
04/09/1990 Microsoft MS-DOS 4.01 (Russian Version) introduced
05/22/1990 Microsoft releases Windows 3.0. First version of Windows to allow use of memory beyond 640Kb, up to 16MB of RAM with 386 enhanced mode, support for color palettes with more than 16 colors, hierarchical menus, "Program Manager" and "File Manager", private INI files, network support, and API support for combo boxes.
(Over 10 million copies of Microsoft Windows were sold.)
1991 http://www.tacktech.com
10/--/1991 Windows NT is displayed publicly at a demo at COMDEX.
10/20/1991 Microsoft Windows 3.0 with Multimedia Extensions released
06/--/1991 MS-DOS 5.0 shipped. This was the first version of MS-DOS that featured a retail upgrade.
1992 http://www.tacktech.com
04/06/1992 Microsoft Windows 3.1 was released.
TrueType scalable fonts support, Object Linking and Embedding (OLE), mouse trails, and API multimedia and networking support were added.
10/11/1992 Microsoft Windows NT beta program shipped
10/27/1992 Microsoft Windows for Workgroups 3.1 released. It added easier, integrated networking.
1993 http://www.tacktech.com
03/--/1993 Microsoft Windows NT 3.1 Beta
03/30/1993 MS-DOS 6.0 upgrade shipped.
This version included DoubleSpace
05/24/1993 Microsoft Window NT formally launched. It was scheduled for release in 60 days.
06/--/1993 Microsoft begins the development of the successor to Windows 3.x which will later be title Windows 95 (code-named Chicago")
08/--/1993 Microsoft Windows NT 3.1 released after five years in development. It consists of over 6 million lines of code.
11/--/1993 MS-DOS 6.2 released.
11/08/1993 Microsoft Windows for Workgroups 3.11 was shipped.
This version corrected some network-related problems.
1994 http://www.tacktech.com
03/02/1994 MS-DOS 6.21 ships with drive compression removed due to a law suit.
04/11/1994 MS-DOS 6.22 ships with new DriveSpace drive compression.
Q1/--/1994 Microsoft is planing to release a new version Windows the second half of 1994.
09/06/1994 Microsoft Windows NT 3.5 (code-named Daytona") released. It consists of over 9 million lines of code.
09/08/1994 Microsoft Windows 95 becomes the official name of the new version of Windows code-named "Chicago".
1995 http://www.tacktech.com
06/--/1995 Microsoft Windows NT 3.51 released. Minor release is to support upcoming Windows 95 programs.
08/24/1995 Microsoft Windows 95 released. It include MS-DOS 7.0 v4.00.950
The upgrade consisted of 17cabs. The full version had 28 cabs.
12/--/1995 Microsoft Windows code-named "Nashville" v4.10.999
This was often referred to as Windows 96. It was never release. Windows 98 later included it's features.
1996 http://www.tacktech.com
08/24/1996 Microsoft Windows NT 4.0 released. It consists of over 16 million lines of code.
09/--/1996 Microsoft Windows 95 SR2 released v4.00.950B or v4.00.1111
Microsoft Windows 95 is scheduled for a major overhaul in 1997, code-named Memphis (Windows 98 1st ED).
11/--/1996 Microsoft Windows CE 1.0 released, supporting handheld-PCs
12/--/1996 Microsoft Windows 95 SR2.1
1MB supplement for SR2 named usbsupp.exe. Partial USB support includes host controller and hub drivers, and the HID and Imaging classes. AGP support. Recommended for SR2 users wanting USB.
12/--/1996 Microsoft Windows 95 code-named Detroit (SR3) v4.10.1525.3
This development line attempted to give Windows 95 integrated Internet components. It buggy and unstable. The planned release was Dec. 1996. Microsoft scraped it.
1997 http://www.tacktech.com
07/--/1997 Microsoft Windows 98 (Beta 1), code-named "Memphis" released. v4.10.1525.3 (Also, referred to as Windows 9x and Windows 97) Consisted of 47 cabs with IE4 build 4.71.0913.5. NT kernel and speedier registry handling. Curiously, the version# lines up with W96 (4.10.999). Included Winsock2, multiple display support, a DVD player, DirectX5, USB support, Memphis specific Tweak UI additions, System Optimizer, System Troubleshooter and TV listings software (MS CDF).
09/27/1997 Microsoft Windows NT 5.0 (Beta 1) released. Later known as Windows 2000
11/--/1997 Microsoft Windows CE 2.0 released
12/--/1997 Microsoft Windows SR2.5 v4.00.950C
OEM only release. Mostly identical to SR2, but adds SR2.1 USB/AGP update along with IE4 and DirectX 5. Contained the second USB supplement.
12/--/1997 Microsoft Windows NT 4.0 Option Pack released
1998 http://www.tacktech.com
06/25/1998 Microsoft Windows 98 released. v4.10.1998.6
Consisted of 69 cabs with IE4 version 4.72.3110. Features: Some NT kernel and speedier registry handling, FAT32.
07/--/1998 Microsoft Windows CE 2.1 released, supporting palm-sized PCs
08/20/1998 Microsoft Windows NT 5.0 (Beta 2) released (code-named "Cairo)
10/27/1998 Microsoft announces that Windows NT 5.0 will be renamed "Windows 2000"
12/16/1998 Microsoft Windows 2000 (RC0) release
1999 http://www.tacktech.com
01/--/1999 Microsoft Windows 98 SP1 (Beta 1) v4.10.2120
Contains Internet Explorer 5 & DX6.1 Delay of beta 2 caused by bugs in IE5 and a memory leak. Microsoft discontinued SP1 in favor a smaller 41MB patch. Microsoft thought it too big for downloading. Microsoft may release an upgrade CD (SP1) which it would sell for a nominal price from it's Webster.
04/29/1999 Microsoft Windows 2000 (Beta 3) released v5.00.2031
05/05/1999 Microsoft Windows 98 SE (second edition) released v4.10.2222.
Contained bug fixes, security fixes, Internet Explorer 5 & DirectX6.1 Also, new functionality and hardware capabilities were added.
07/02/1999 Microsoft Windows 2000 (RC1) released
07/23/1999 Microsoft Windows Millennium Developer Preview 1 released
07/26/1999 Microsoft Windows Millennium Offically Announced
08/--/1999 Microsoft Windows 98 SE update CD available. This CD will upgrade your Windows 98 4.10.1998 to Second Edition. You can order it from Microsoft. (The Windows 98 Customer Service Pack CD just fixes bugs and Y2K issues, )
08/25/1999 Microsoft and Compaq discontinue all Windows NT/2000 development for the Alpha processor
09/15/1999 Microsoft Windows 2000 (RC2) released build 2128
09/23/1999 Microsoft Windows Millennium (Beta 1) - build 4.90.2380.2
Windows Millennium Beta 1 - TechNet Dec. 1999
Build 4.90.2380
IE 5.50.3723.1301 56-bit cipher
OE 5.00.2919.5600
Explorer 5.50.3723.1301
Media Player: 7.00.00.0093
File Dates 09/20/1999 10:00AM
CD Label: WinMil B1
Files on CD Date: 09/22/1999 12:20PM
11/11/1999 Microsoft Windows 2000 (RC3) released v5.00.2183
11/23/1999 Microsoft Windows Millennium (Beta 2) - build 4.90.2419.5
Windows Millennium Beta 2 - TechNet Jan. 2000
Build 4.90.2419
IE 5.50.3825.1300 56-bit cipher
OE 5.50.3825.400
Explorer 5.50.3825.1300
Meda Player: 6.4.07.1028
File Dates 11/17/1999 05:00PM
CD Label: WinMil Beta
Files on CD Date: 11/17/1999 05:00PM
Folder on CD Dates: 11/17/1999 05:00PM
Included CD Sampler
12/15/1999 Microsoft Windows 2000 RTM released (i.e., coding completed)
12/--/1999 Microsoft Windows Whistler build 5.01.xxxx (Later Windows.NET)
Microsoft had three Windows consumer version development lines running. Windows Neptune was the codename for the operating system to follow Windows ME. Windows Odyssey was yet another OS that would follow Windows Neptune. Both have since been cancelled in favor of Whistler which will the first consumer version of the NT code.
2000 http://www.tacktech.com
01/19/2000 Microsoft Windows 2000 MSDN released
01/20/2000 Microsoft Windows Millennium (Beta 2 refresh) - build 2452
02/10/2000? Microsoft Windows Whistler build 5.01.2200
02/17/2000 Microsoft Windows 2000 Professional, Server, and Advanced Server released. v5.00.2195
02/18/2000 Microsoft Windows Millennium - build 2470
02/25/2000 Microsoft Windows Millennium - build 2476
03/--/2000 Microsoft Blackcomb is now being developed which will be the follow up to Whistler .
03/03/2000 Microsoft Windows Millennium - build 2481
03/10/2000 Microsoft Windows Millennium - build 2487
03/17/2000 Microsoft Windows Millennium - build 2491
03/27/2000 Microsoft Windows Millennium - build 2499
03/20/2000? Microsoft Windows Whistler build 5.01.2211.1 leaked on the Web
03/30/2000 Microsoft Windows Millennium - build 2499.3
04/07/2000 Microsoft Windows Millennium (Beta 3) - build 2499.7 completed
04/11/2000 Microsoft Windows Millennium (Beta 3) - build 2499.7 released
Windows Millennium Beta 3 - TechNet Jun. 2000
Build 4.90.2499
IE 5.50.4030.2400 128-bit cipher
OE 5.50.4029.2901
Explorer 5.50.4030.2400
Meda Player: 7.00.00.1153
File Dates 04/04/2000 05:00PM
CD Label: WinMEB3
Files on CD Date: 04/04/2000 10:00AM
Folder on CD Dates: 05/11/2000 3:47PM 3:47PM 3:34PM 3:40PM 3:41PM 4:11PM
Included CD Sampler
04/18/2000 Microsoft Windows Millennium - build 2509
04/21/2000 Microsoft Windows Millennium - build 2513
04/25/2000 Microsoft showcased 'Whistler' at the Windows Hardware Engineering Conference (WinHEC)
04/26/2000? Microsoft Windows Whistler build 5.01.2XXX leaked on the Web
04/28/2000 Microsoft Windows Millennium - build 2516
05/09/2000 Microsoft Windows Millennium Edition (RC0) - build 2525
05/17/2000 Microsoft Windows Millennium Edition (RC1) - build 2525.6
06/06/2000? Microsoft Windows Millennium Edition (RC2) - build 2535
06/18/2000? Microsoft Windows Millennium Edition when gold (v4.90.3000.2)
Internet Explorer 5.5 is included. New Icons and color scheme like those found in Windows 2000.
Microsoft Windows Whistler Build 2223.1
07/11/2000 Microsoft Windows Whistler Build 2250
07/31/2000 Microsoft Windows 2000 SP1 released
08/31/2000 Microsoft Windows 2001, code-named "Whistler" invites sent to previous beta testers. It is rumored the build 2257 of the Personal and Professional releases are bugged so they will sent the internal, Washington. This feature is currently not included in the Server and Advanced Server versions.
09/14/2000 Microsoft Windows ME to be offically released
10/01/2000 Microsoft Whistler Beta1
12/06/2000 Microsoft Whistler Beta2
2001 http://www.tacktech.com
02/14/2001 Microsoft Whistler RC1
03/21/2001 Microsoft Whistler RC2
04/18/2001 Microsoft Whistler Final Build
2003 http://www.tacktech.com
03/28/2003 Microsoft Releases Windows XP 64-Bit Edition Version 2003 to Manufacturing
DVD File/Folder Structure
Explanation:
. BUP = Backup files of the IFO files.
. IFO = The IFO files includes information such as chapters, subtitle tracks and audio tracks.
. VOB = The VOB files contains the actual video,audio,subtitles and menus.
Folder Files Explanation
AUDIO_TS (undefined) DVD Audio
VIDEO_TS VIDEO_TS.BUP
VIDEO_TS.IFO The first video play item, IFO, usally a copyright notice or a menu
VIDEO_TS.VOB The first video play item, VOB
VTS_01_0.BUP
VTS_01_0.IFO Title 01, IFO, usually the main movie
VTS_01_0.VOB Title 01, VOB 0, the menu for this title
VTS_01_1.VOB Title 01, VOB 1, the video for this title
VTS_01_2.VOB Title 01, VOB 2, if larger than 1 GB it will be splitted into several vobs
VTS_01_3.VOB Title 01, VOB 3
VTS_01_4.VOB Title 01, VOB 4, up to 10(0-9) VOB files if necassary
VTS_02_0.BUP
VTS_02_0.IFO Title 02, IFO, usually movie extras
VTS_02_0.VOB Title 02, VOB 0, the menu for this title
VTS_02_1.VOB Title 02, VOB 1, the video for this title
VTS_xx_x.BUP
VTS_xx_x.IFO And so on
VTS_xx_x.VOB
VTS_xx_x.VOB
VTS_99_9.VOB Up to 99(1-99) titles with max 10(0-9) VOB files each
Explanation:
. BUP = Backup files of the IFO files.
. IFO = The IFO files includes information such as chapters, subtitle tracks and audio tracks.
. VOB = The VOB files contains the actual video,audio,subtitles and menus.
Folder Files Explanation
AUDIO_TS (undefined) DVD Audio
VIDEO_TS VIDEO_TS.BUP
VIDEO_TS.IFO The first video play item, IFO, usally a copyright notice or a menu
VIDEO_TS.VOB The first video play item, VOB
VTS_01_0.BUP
VTS_01_0.IFO Title 01, IFO, usually the main movie
VTS_01_0.VOB Title 01, VOB 0, the menu for this title
VTS_01_1.VOB Title 01, VOB 1, the video for this title
VTS_01_2.VOB Title 01, VOB 2, if larger than 1 GB it will be splitted into several vobs
VTS_01_3.VOB Title 01, VOB 3
VTS_01_4.VOB Title 01, VOB 4, up to 10(0-9) VOB files if necassary
VTS_02_0.BUP
VTS_02_0.IFO Title 02, IFO, usually movie extras
VTS_02_0.VOB Title 02, VOB 0, the menu for this title
VTS_02_1.VOB Title 02, VOB 1, the video for this title
VTS_xx_x.BUP
VTS_xx_x.IFO And so on
VTS_xx_x.VOB
VTS_xx_x.VOB
VTS_99_9.VOB Up to 99(1-99) titles with max 10(0-9) VOB files each
Non-standard special DVD formats:
DVD-VCD
is basicly a VCD authored on a DVD. DVD supports the VCD resolution but the audio has to be resampled to 48 khz. If the audio is resampled to 48 khz it is standard DVD-Video. Read more here how to make a such.
DVD-SVCD
is basicly a SVCD authored on a DVD. DVD do not supports the SVCD resolution but it may anyway work and the audio has to be resampled to 48 khz like the DVD-VCD. Read more here how to make a such and download a DVD Sample including a DVD-SVCD here.
DVD-MP3
is MP3s burned on a DVD but very few MP3 capable standalone DVD Players supports it because most Players verify DVD as DVD-Video only. Check our DVD Players list for compatibility.
DVD-ISO
is MPEG ,MPG, VOB files burned on a DVD without any DVD Authoring(making the vob,ifo files) but very few standalone DVD Players supports it because most Players verify DVD as DVD-Video only. Check our DVD Players list for compatibility.
DVD-VCD
is basicly a VCD authored on a DVD. DVD supports the VCD resolution but the audio has to be resampled to 48 khz. If the audio is resampled to 48 khz it is standard DVD-Video. Read more here how to make a such.
DVD-SVCD
is basicly a SVCD authored on a DVD. DVD do not supports the SVCD resolution but it may anyway work and the audio has to be resampled to 48 khz like the DVD-VCD. Read more here how to make a such and download a DVD Sample including a DVD-SVCD here.
DVD-MP3
is MP3s burned on a DVD but very few MP3 capable standalone DVD Players supports it because most Players verify DVD as DVD-Video only. Check our DVD Players list for compatibility.
DVD-ISO
is MPEG ,MPG, VOB files burned on a DVD without any DVD Authoring(making the vob,ifo files) but very few standalone DVD Players supports it because most Players verify DVD as DVD-Video only. Check our DVD Players list for compatibility.
DVD Write and read speeds
Single Layer(4.7GB) write speeds
1x (CLV) = about 58 minutes
2x (CLV) = about 29 minutes
2.4x (CLV) = about 24 minutes
4x (CLV) = about 14.5 minutes
6x (CLV/ZCLV) = about 10-12 minutes
8x (PCAV/ZCLV) = about 8-10 minutes
12x (PCAV/ZCLV) = about 6.5-7.5 minutes
16x (CAV/ZCLV) = about 6-7 minutes
Dual/Double Layer(8.5GB) write speeds
1x CLV = about 105 minutes
2.4x CLV = about 44 minutes
4x CLV = about 27 minutes
Single Layer (4.7GB) read speeds
6x CAV (avg. ~4x) read speed is max 7.93MB/s = ~14 minutes
8x CAV (avg. ~6x) read speed is max 10.57MB/s = ~10 minutes
12x CAV (avg. ~8x) read speed is max 15.85MB/s = ~7 minutes
16x CAV (avg. ~12x) read speed is max 21.13MB/s = ~5 minutes
* write speed time and read speed time is not the same because writing requires some extra steps and also does the faster writing above 6x usually use lower write speeds for some parts of the dvd. 4x DVD speed = 36x CD speed. See section 4.2 in the DVDDemystified FAQ here.
Single Layer(4.7GB) write speeds
1x (CLV) = about 58 minutes
2x (CLV) = about 29 minutes
2.4x (CLV) = about 24 minutes
4x (CLV) = about 14.5 minutes
6x (CLV/ZCLV) = about 10-12 minutes
8x (PCAV/ZCLV) = about 8-10 minutes
12x (PCAV/ZCLV) = about 6.5-7.5 minutes
16x (CAV/ZCLV) = about 6-7 minutes
Dual/Double Layer(8.5GB) write speeds
1x CLV = about 105 minutes
2.4x CLV = about 44 minutes
4x CLV = about 27 minutes
Single Layer (4.7GB) read speeds
6x CAV (avg. ~4x) read speed is max 7.93MB/s = ~14 minutes
8x CAV (avg. ~6x) read speed is max 10.57MB/s = ~10 minutes
12x CAV (avg. ~8x) read speed is max 15.85MB/s = ~7 minutes
16x CAV (avg. ~12x) read speed is max 21.13MB/s = ~5 minutes
* write speed time and read speed time is not the same because writing requires some extra steps and also does the faster writing above 6x usually use lower write speeds for some parts of the dvd. 4x DVD speed = 36x CD speed. See section 4.2 in the DVDDemystified FAQ here.
DVD Sizes
The DVD sizes can be a bit confusing. There are basicly 4 different DVD Sizes,
DVD-5, holds around 4 700 000 000 bytes and that is 4.37 computer GB where 1 kbyte is 1024 bytes* . DVD+R/DVD+RW and DVD-R/DVD-RW supports this format. Also called Single Sided Single Layered. This is the most common DVD Media, often called 4.7 GB Media.
DVD-10, holds around 9 400 000 000 bytes and that is 8.75 computer GB. DVD+R/DVD+RW and DVD-R/DVD-RW supports this format. Also called Double Sided Single Layered.
DVD-9, holds around 8 540 000 000 bytes and that is 7.95 computer GB. DVD+R supports this format. Also called Single Sided Dual Layered. This media is called DVD+R9, DVD+R DL or 8.5 GB Media.
DVD-18, holds around 17 080 000 000 bytes and that is 15.9 computer GB. DVD+R supports this format. Also called Double Sided Dual Layered.
* In the computer world is 1 KB data = 1024 bytes so 4 700 000 000 bytes / 1024 = 4 589 843KB / 1024 = 4482MB / 1024 = 4.37GB. See section 3.3 in the DVDDemystified FAQ here.
DVD+R/DVD+RW/DVD+R DL and DVD-R/DVD-RW exact sizes
DVD-R/DVD-RW = 4 706 074 624 bytes ( 4488 MB )
DVD+R/DVD+RW = 4 700 372 992 bytes ( 4482 MB )
DVD+R DL = 8 547 993 600 bytes ( 8152 MB )
The DVD sizes can be a bit confusing. There are basicly 4 different DVD Sizes,
DVD-5, holds around 4 700 000 000 bytes and that is 4.37 computer GB where 1 kbyte is 1024 bytes* . DVD+R/DVD+RW and DVD-R/DVD-RW supports this format. Also called Single Sided Single Layered. This is the most common DVD Media, often called 4.7 GB Media.
DVD-10, holds around 9 400 000 000 bytes and that is 8.75 computer GB. DVD+R/DVD+RW and DVD-R/DVD-RW supports this format. Also called Double Sided Single Layered.
DVD-9, holds around 8 540 000 000 bytes and that is 7.95 computer GB. DVD+R supports this format. Also called Single Sided Dual Layered. This media is called DVD+R9, DVD+R DL or 8.5 GB Media.
DVD-18, holds around 17 080 000 000 bytes and that is 15.9 computer GB. DVD+R supports this format. Also called Double Sided Dual Layered.
* In the computer world is 1 KB data = 1024 bytes so 4 700 000 000 bytes / 1024 = 4 589 843KB / 1024 = 4482MB / 1024 = 4.37GB. See section 3.3 in the DVDDemystified FAQ here.
DVD+R/DVD+RW/DVD+R DL and DVD-R/DVD-RW exact sizes
DVD-R/DVD-RW = 4 706 074 624 bytes ( 4488 MB )
DVD+R/DVD+RW = 4 700 372 992 bytes ( 4482 MB )
DVD+R DL = 8 547 993 600 bytes ( 8152 MB )
DVD
DVD stands for Digital Versatile/Video Disc, DVDR stands for DVD Recordable and DVDRW for DVD ReWriteable. If you're familiar with regular audio/music CDs or regular DVD-Video discs, then you will know what a recordable DVD looks like. A recordable DVD stores up to 2 hours of very good quality DVD-Video, including several audio tracks in formats like stereo, Dolby Digital or DTS and also advanced menu systems, subtitles and still pictures that can be played by many standalone DVD Players and most computer DVD-ROMs. If you choose to lower the video quality it is possible to store several hours video on a recordable DVD using low bitrates and low resolution with video quality more like VHS, SVHS, SVCD, CVD or VCD. It is also possible to have up to 4.37* GB ordinary data or mix DVD-Video and data on a recordable DVD that can be played by most computer DVD-ROMs.
There are three competing DVD Recording standards, DVD-R/DVD-RW and DVD+R/DVD+RW have pretty similiar features and are compatible with many standalone DVD Players and most DVD-ROMs while DVD-RAM has less DVD Player and DVD-ROM compatibility but better recording features.
DVD-R and DVD-RW
DVD-R was the first DVD recording format released that was compatible with standalone DVD Players.
DVD-R is a non-rewriteable format and it is compatible with about 93% of all DVD Players and most DVD-ROMs.
DVD-RW is a rewriteable format and it is compatible with about 80% of all DVD Players and most DVD-ROMs.
DVD-R and DVD-RW supports single side 4.37 computer GB* DVDs(called DVD-5) and double sided 8.75 computer GB* DVDs(called DVD-10).
These formats are supported by DVDForum.
DVD+R and DVD+RW
DVD+R is a non-rewritable format and it is compatible with about 89% of all DVD Players and most DVD-ROMs.
DVD+RW is a rewritable format and is compatible with about 79% of all DVD Players and most DVD-ROMs.
DVD+R and DVD+RW supports single side 4.37 computer GB* DVDs(called DVD-5) and double side 8.75 computer GB* DVDs(called DVD-10).
These formats are supported by the DVD+RW Alliance.
DVD+R DL
DVD+R DL or called DVD+R9 is a Dual Layer writeable DVD+R. The dual layered discs can hold 7.95 computer GB* (called DVD-9) and dual layered double sides 15.9* computer GB (called dvd-18).
DVD-RAM
DVD-RAM has the best recording features but it is not compatible with most DVD-ROM drives and DVD-Video players. Think more of it as a removable hard disk. DVD-RAM is usually used in some DVD Recorders.
This format is supported by DVDForum.
DVD stands for Digital Versatile/Video Disc, DVDR stands for DVD Recordable and DVDRW for DVD ReWriteable. If you're familiar with regular audio/music CDs or regular DVD-Video discs, then you will know what a recordable DVD looks like. A recordable DVD stores up to 2 hours of very good quality DVD-Video, including several audio tracks in formats like stereo, Dolby Digital or DTS and also advanced menu systems, subtitles and still pictures that can be played by many standalone DVD Players and most computer DVD-ROMs. If you choose to lower the video quality it is possible to store several hours video on a recordable DVD using low bitrates and low resolution with video quality more like VHS, SVHS, SVCD, CVD or VCD. It is also possible to have up to 4.37* GB ordinary data or mix DVD-Video and data on a recordable DVD that can be played by most computer DVD-ROMs.
There are three competing DVD Recording standards, DVD-R/DVD-RW and DVD+R/DVD+RW have pretty similiar features and are compatible with many standalone DVD Players and most DVD-ROMs while DVD-RAM has less DVD Player and DVD-ROM compatibility but better recording features.
DVD-R and DVD-RW
DVD-R was the first DVD recording format released that was compatible with standalone DVD Players.
DVD-R is a non-rewriteable format and it is compatible with about 93% of all DVD Players and most DVD-ROMs.
DVD-RW is a rewriteable format and it is compatible with about 80% of all DVD Players and most DVD-ROMs.
DVD-R and DVD-RW supports single side 4.37 computer GB* DVDs(called DVD-5) and double sided 8.75 computer GB* DVDs(called DVD-10).
These formats are supported by DVDForum.
DVD+R and DVD+RW
DVD+R is a non-rewritable format and it is compatible with about 89% of all DVD Players and most DVD-ROMs.
DVD+RW is a rewritable format and is compatible with about 79% of all DVD Players and most DVD-ROMs.
DVD+R and DVD+RW supports single side 4.37 computer GB* DVDs(called DVD-5) and double side 8.75 computer GB* DVDs(called DVD-10).
These formats are supported by the DVD+RW Alliance.
DVD+R DL
DVD+R DL or called DVD+R9 is a Dual Layer writeable DVD+R. The dual layered discs can hold 7.95 computer GB* (called DVD-9) and dual layered double sides 15.9* computer GB (called dvd-18).
DVD-RAM
DVD-RAM has the best recording features but it is not compatible with most DVD-ROM drives and DVD-Video players. Think more of it as a removable hard disk. DVD-RAM is usually used in some DVD Recorders.
This format is supported by DVDForum.
Default Password List Website Links
http://www.phenoelit.de/dpl/dpl.html
CIRT.Net
http://www.cirt.net/cgi-bin/passwd.pl
http://www.phenoelit.de/dpl/dpl.html
CIRT.Net
http://www.cirt.net/cgi-bin/passwd.pl
System Preparation Tool (Sysprep) Script File Keys
Article ID : 196667
Last Review : September 9, 2002
Revision : 1.0
This article was previously published under Q196667
On this page
SUMMARY
MORE INFORMATION
REFERENCES
SUMMARY
When you use the Microsoft System Preparation (Sysprep) tool, a wizard runs the next time the computer is started after the tool prepares the computer and copies an image to the computer. You can automate this process by creating a script file. To use Sysprep with a script file, use the following syntax
sysprep.exe
where is the name of the script file.
Note that the script file must contain one section called [NT4Preinstall].
MORE INFORMATION
Script File Keys
You can use the following keys in the Sysprep script file:
Key name: OemSkipEula
Values: Yes | No
Description: This key disables the display of the End User License
Agreement (EULA) when the value is set to Yes. The default
value is No.
Key name: ProductID
Value: xxx-xxxxxxx OR xxxxx-OEM-xxxxxx-xxxxx
Description: This key specifies whether the Product ID screen should be
displayed. The Product ID key is displayed by default.
Key name: FullName
Value:
Description: This key specifies the user's name. If this key is not
specified or the string value is blank, the User Name And
Organization screen is displayed.
Key name: OrgName
Value:
Description: This key specifies the user's organization or company name.
If this key is not specified or the string value is blank,
the User Name And Organization screen is displayed, unless
the FullName key is specified with a valid string value.
Key name: ComputerName
Values: | "Auto"
Description: This key specifies the computer name. If this key is not
specified or the string value is blank, the Computer Name
screen is displayed. The string value must be a minimum of 1
non-white-space character and a maximum of 15 non-white-space
characters.
If this string value is set to "Auto," Setup automatically
generates a unique computer name based on a random number.
This provides a mechanism to install multiple computers with
a unique computer name.
Key name: AdminPassword
Value:
Description: This key specifies the password for the administrator
account. If this key is not specified or the string value is
blank, the Administrator Password screen is displayed. The
string value must be a minimum of 1 non-white-space character
and a maximum of 15 non-white-space characters. To specify a
blank or NULL password use "*".
Key name: OEMBannerText
Value:
Description: This key specifies a string to be displayed in the upper-left
corner of the screen. The text must contain the "Windows NT"
sub-string or it is ignored. You can specify multiple lines
by using the "*" character as a separator.
Key name: OEMLogoBitmapFile
Values: [, ]
Description: This key specifies a bitmap to be displayed in the upper-
right corner of the screen. If this key has only one field,
it is assumed to be a bitmap (.bmp) file located in the
folder in which the System Preparation tool resides. If two
fields are specified, the first field is the name of a
dynamic-link library (DLL) and the second field is a decimal
number that represents the resource ID of the bitmap in the
DLL. The DLL should be located in the folder that contains
Sysprep.exe.
Key name: OEMBackgroundBitmapFile
Values: [,]
Description: This key specifies a background bitmap to display. If this
key has only one field, it is assumed to be a bitmap (.bmp)
file located in the folder in which Sysprep.exe resides. If
two fields are specified, the first field is the name of a
dynamic-link library (DLL) and the second field is a decimal
number that represents the resource ID of the bitmap in the
DLL. The DLL should be located in the folder that contains
Sysprep.exe.
Key name: OEMSkipWelcome
Values: 0 | 1
Description: If this key is set to 1, the Welcome page is skipped. If the
key is set to 0, the Welcome page is displayed.
Key name: OEMNoWaitAfterGUIMode
Values: 0 | 1
Description: If this key is set to 1, the Finished page is not displayed
and the computer is automatically restarted when the wizard
is finished. If the key is set to 0, the Finished page is
displayed and the computer does not automatically restart.
Key name: NoSidGen
Value: Yes | No
Description: This key disables the Security Identification (SID)
modification code. Set this key to Yes to disable the SID
modification code. You might use this value if the computer
is to be preconfigured with system services and access (ACL)
permissions. This allows a system integrator or administrator
to preconfigure a computer and set the computer name,
administrator password, and other settings at the final
location.
NOTE: Do not use this key if you plan to duplicate the
system.
Sample Script File
The following sample file is an example of a Windows NT 4.0 Mini-Setup wizard script:
[NT4Preinstall]
OemSkipEula = Yes
ProductID = 123-4567890
FullName = "Sample Company User"
OrgName = "Sample Company Inc."
ComputerName = "auto"
AdminPassword = "password"
Sysprep.exe Command-Line Switches
Sysprep supports the following command-line switches:
Switch:
Description: Instructs the Windows NT 4.0 Mini-Setup wizard to use the
settings in the specified script file automatically. For
example, the following command specifies that the Mini-Setup
wizard should use the settings in the Nt4setup.inf file:
sysprep nt4setup.inf
NOTE: There is no dash preceding the script file name.
Switch: -quiet
Description: Instructs Sysprep to run without displaying a warning dialog
box. For example, the following command specifies that only
the license information screen should be displayed:
sysprep -quiet
The warning message stating that the computer is going to be
prepared for disk imaging and automatically shut down is not
displayed, and the computer shuts down automatically.
NOTE: The preceding dash is required.
Switch: -reboot
Description: Instructs Sysprep to automatically restart the computer. For
example, the following command specifies that the computer is
restarted automatically instead of being shut down after
Sysprep has finished:
sysprep -reboot
You should not use this switch if you are preparing the
computer for disk imaging. This switch may be useful if you
plan to automate a test process designed to run after Sysprep
has finished.
NOTE: The preceding dash is required.
Switch: -defeat
Description: Instructs Sysprep to run on a computer that has retail
versions of Windows NT 4.0 Workstation or Windows NT 4.0
Server and Microsoft Office 97. Normally, Sysprep requires
a Microsoft Select Volume CD-ROM or an OEM (Original
Equipment Manufacturer) CD-ROM installation to run.
The following sample Sysprep command uses all the command-line switches:
sysprep setupscript.inf -quiet -reboot -defeat
REFERENCES
For additional information about Sysprep, please review the Sysprep.doc file that is included with the Sysprep tool.
Article ID : 196667
Last Review : September 9, 2002
Revision : 1.0
This article was previously published under Q196667
On this page
SUMMARY
MORE INFORMATION
REFERENCES
SUMMARY
When you use the Microsoft System Preparation (Sysprep) tool, a wizard runs the next time the computer is started after the tool prepares the computer and copies an image to the computer. You can automate this process by creating a script file. To use Sysprep with a script file, use the following syntax
sysprep.exe
where
Note that the script file must contain one section called [NT4Preinstall].
MORE INFORMATION
Script File Keys
You can use the following keys in the Sysprep script file:
Key name: OemSkipEula
Values: Yes | No
Description: This key disables the display of the End User License
Agreement (EULA) when the value is set to Yes. The default
value is No.
Key name: ProductID
Value: xxx-xxxxxxx OR xxxxx-OEM-xxxxxx-xxxxx
Description: This key specifies whether the Product ID screen should be
displayed. The Product ID key is displayed by default.
Key name: FullName
Value:
Description: This key specifies the user's name. If this key is not
specified or the string value is blank, the User Name And
Organization screen is displayed.
Key name: OrgName
Value:
Description: This key specifies the user's organization or company name.
If this key is not specified or the string value is blank,
the User Name And Organization screen is displayed, unless
the FullName key is specified with a valid string value.
Key name: ComputerName
Values:
Description: This key specifies the computer name. If this key is not
specified or the string value is blank, the Computer Name
screen is displayed. The string value must be a minimum of 1
non-white-space character and a maximum of 15 non-white-space
characters.
If this string value is set to "Auto," Setup automatically
generates a unique computer name based on a random number.
This provides a mechanism to install multiple computers with
a unique computer name.
Key name: AdminPassword
Value:
Description: This key specifies the password for the administrator
account. If this key is not specified or the string value is
blank, the Administrator Password screen is displayed. The
string value must be a minimum of 1 non-white-space character
and a maximum of 15 non-white-space characters. To specify a
blank or NULL password use "*".
Key name: OEMBannerText
Value:
Description: This key specifies a string to be displayed in the upper-left
corner of the screen. The text must contain the "Windows NT"
sub-string or it is ignored. You can specify multiple lines
by using the "*" character as a separator.
Key name: OEMLogoBitmapFile
Values:
Description: This key specifies a bitmap to be displayed in the upper-
right corner of the screen. If this key has only one field,
it is assumed to be a bitmap (.bmp) file located in the
folder in which the System Preparation tool resides. If two
fields are specified, the first field is the name of a
dynamic-link library (DLL) and the second field is a decimal
number that represents the resource ID of the bitmap in the
DLL. The DLL should be located in the folder that contains
Sysprep.exe.
Key name: OEMBackgroundBitmapFile
Values:
Description: This key specifies a background bitmap to display. If this
key has only one field, it is assumed to be a bitmap (.bmp)
file located in the folder in which Sysprep.exe resides. If
two fields are specified, the first field is the name of a
dynamic-link library (DLL) and the second field is a decimal
number that represents the resource ID of the bitmap in the
DLL. The DLL should be located in the folder that contains
Sysprep.exe.
Key name: OEMSkipWelcome
Values: 0 | 1
Description: If this key is set to 1, the Welcome page is skipped. If the
key is set to 0, the Welcome page is displayed.
Key name: OEMNoWaitAfterGUIMode
Values: 0 | 1
Description: If this key is set to 1, the Finished page is not displayed
and the computer is automatically restarted when the wizard
is finished. If the key is set to 0, the Finished page is
displayed and the computer does not automatically restart.
Key name: NoSidGen
Value: Yes | No
Description: This key disables the Security Identification (SID)
modification code. Set this key to Yes to disable the SID
modification code. You might use this value if the computer
is to be preconfigured with system services and access (ACL)
permissions. This allows a system integrator or administrator
to preconfigure a computer and set the computer name,
administrator password, and other settings at the final
location.
NOTE: Do not use this key if you plan to duplicate the
system.
Sample Script File
The following sample file is an example of a Windows NT 4.0 Mini-Setup wizard script:
[NT4Preinstall]
OemSkipEula = Yes
ProductID = 123-4567890
FullName = "Sample Company User"
OrgName = "Sample Company Inc."
ComputerName = "auto"
AdminPassword = "password"
Sysprep.exe Command-Line Switches
Sysprep supports the following command-line switches:
Switch:
Description: Instructs the Windows NT 4.0 Mini-Setup wizard to use the
settings in the specified script file automatically. For
example, the following command specifies that the Mini-Setup
wizard should use the settings in the Nt4setup.inf file:
sysprep nt4setup.inf
NOTE: There is no dash preceding the script file name.
Switch: -quiet
Description: Instructs Sysprep to run without displaying a warning dialog
box. For example, the following command specifies that only
the license information screen should be displayed:
sysprep -quiet
The warning message stating that the computer is going to be
prepared for disk imaging and automatically shut down is not
displayed, and the computer shuts down automatically.
NOTE: The preceding dash is required.
Switch: -reboot
Description: Instructs Sysprep to automatically restart the computer. For
example, the following command specifies that the computer is
restarted automatically instead of being shut down after
Sysprep has finished:
sysprep -reboot
You should not use this switch if you are preparing the
computer for disk imaging. This switch may be useful if you
plan to automate a test process designed to run after Sysprep
has finished.
NOTE: The preceding dash is required.
Switch: -defeat
Description: Instructs Sysprep to run on a computer that has retail
versions of Windows NT 4.0 Workstation or Windows NT 4.0
Server and Microsoft Office 97. Normally, Sysprep requires
a Microsoft Select Volume CD-ROM or an OEM (Original
Equipment Manufacturer) CD-ROM installation to run.
The following sample Sysprep command uses all the command-line switches:
sysprep setupscript.inf -quiet -reboot -defeat
REFERENCES
For additional information about Sysprep, please review the Sysprep.doc file that is included with the Sysprep tool.
Wednesday, January 12, 2005
Cannot Start Windows XP After You Install Windows 2000
Article ID : 283433
Last Review : November 18, 2003
Revision : 1.0
This article was previously published under Q283433
On this Page
SYMPTOMS
CAUSE
RESOLUTION
STATUS
MORE INFORMATION
SYMPTOMS
When you attempt to start Windows XP after you install Windows 2000, you may receive the following error message:
"Starting Windows...
Windows 2000 could not start because the following file is missing or corrupt: \WINDOWS\SYSTEM32\CONFIG\SYSTEM.
You can attempt to repair this file by starting Windows 2000 Setup using the original Setup floppy disk or CD-ROM.
Select 'r' at the first screen to start repair."
If the Windows XP install was an upgrade from Windows 2000, you may instead receive the following error message on a blue screen while attempting to start Windows XP:
BAD_SYSTEM_CONFIG_INFO
STOP 0x00000074
CAUSE
This issue occurs because Windows XP did not exist when Windows 2000 was released. The Windows 2000 bootstrap loader files are not aware of the changes that have been made in Windows XP. The computer needs these changes to load Windows XP.
NOTE: If you attempt to install Windows 2000 in a different partition while the computer is running Windows XP, you may receive the following error message:
This CD-ROM is from an older version of Windows than the one you are presently using. Setup functionality from this disk will be disabled.
RESOLUTION
To work around this issue, start the computer in Windows 2000, and then copy the NTLDR and Ntdetect.com files from the I386 folder on the Windows XP CD-ROM to the root of the system drive.
Even though a workaround for this issue is described in this article, you can only perform a dual Startup when you install Windows XP in a different partition after you install Windows 2000.
STATUS
This behavior is by design. In general, products are not forward compatible with future products because the design updates of future versions are unknown.
MORE INFORMATION
If you want to start multiple operating systems, install each operating system in a different partition in the following order: 1. Microsoft Windows 95, Microsoft Windows 98, or Microsoft Windows Millennium Edition (Me)
2. Microsoft Windows NT 4.0
3. Microsoft Windows 2000
4. Microsoft Windows XP
If you do not want to start the computer in all the operating systems that are listed, skip the ones that you do not need. NOTE: Do not convert the hard disk from Basic Disk to Dynamic Disk until you install all of the operating systems that you intend to use. Once you convert the hard disk from Basic Disk to Dynamic Disk, you may be unable to install any other operating systems on that hard disk.
For additional information about dynamic disks, click the article numbers below to view the articles in the Microsoft Knowledge Base:
175761 Dynamic vs. Basic Storage in Windows 2000
114841 Windows NT Boot Process and Hard Disk Constraints
Article ID : 283433
Last Review : November 18, 2003
Revision : 1.0
This article was previously published under Q283433
On this Page
SYMPTOMS
CAUSE
RESOLUTION
STATUS
MORE INFORMATION
SYMPTOMS
When you attempt to start Windows XP after you install Windows 2000, you may receive the following error message:
"Starting Windows...
Windows 2000 could not start because the following file is missing or corrupt: \WINDOWS\SYSTEM32\CONFIG\SYSTEM.
You can attempt to repair this file by starting Windows 2000 Setup using the original Setup floppy disk or CD-ROM.
Select 'r' at the first screen to start repair."
If the Windows XP install was an upgrade from Windows 2000, you may instead receive the following error message on a blue screen while attempting to start Windows XP:
BAD_SYSTEM_CONFIG_INFO
STOP 0x00000074
CAUSE
This issue occurs because Windows XP did not exist when Windows 2000 was released. The Windows 2000 bootstrap loader files are not aware of the changes that have been made in Windows XP. The computer needs these changes to load Windows XP.
NOTE: If you attempt to install Windows 2000 in a different partition while the computer is running Windows XP, you may receive the following error message:
This CD-ROM is from an older version of Windows than the one you are presently using. Setup functionality from this disk will be disabled.
RESOLUTION
To work around this issue, start the computer in Windows 2000, and then copy the NTLDR and Ntdetect.com files from the I386 folder on the Windows XP CD-ROM to the root of the system drive.
Even though a workaround for this issue is described in this article, you can only perform a dual Startup when you install Windows XP in a different partition after you install Windows 2000.
STATUS
This behavior is by design. In general, products are not forward compatible with future products because the design updates of future versions are unknown.
MORE INFORMATION
If you want to start multiple operating systems, install each operating system in a different partition in the following order: 1. Microsoft Windows 95, Microsoft Windows 98, or Microsoft Windows Millennium Edition (Me)
2. Microsoft Windows NT 4.0
3. Microsoft Windows 2000
4. Microsoft Windows XP
If you do not want to start the computer in all the operating systems that are listed, skip the ones that you do not need. NOTE: Do not convert the hard disk from Basic Disk to Dynamic Disk until you install all of the operating systems that you intend to use. Once you convert the hard disk from Basic Disk to Dynamic Disk, you may be unable to install any other operating systems on that hard disk.
For additional information about dynamic disks, click the article numbers below to view the articles in the Microsoft Knowledge Base:
175761 Dynamic vs. Basic Storage in Windows 2000
114841 Windows NT Boot Process and Hard Disk Constraints
Monday, January 10, 2005
Read-Only USB Storage
If you've been concerned about the possibility that users in your Windows XP environment might plug in a USB storage key and walk away with hundreds of megabytes of proprietary corporate information, XP Service Pack 2 (SP 2) lets you make USB storage devices read only, removing the possibility of leaking data via a USB key. To configure USB storage for read only, perform the following steps:
1. Launch the registry editor.
2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
3. You should see a key called StorageDevicePolicies. If it doesn't exist, create a new key with that name.
4. In the StorageDevicePolicy key, create a REG_DWORD value called WriteProtect.
5. Set the data value of WriteProtect to 1.
6. This value will make USB storage read only. To enable read/write over USB, set the value to 0.
7. Exit the editor.
Make sure that you aren't using other USB storage devices such as hard drives or a CD/DVD writer before you set this registry value.
If you've been concerned about the possibility that users in your Windows XP environment might plug in a USB storage key and walk away with hundreds of megabytes of proprietary corporate information, XP Service Pack 2 (SP 2) lets you make USB storage devices read only, removing the possibility of leaking data via a USB key. To configure USB storage for read only, perform the following steps:
1. Launch the registry editor.
2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
3. You should see a key called StorageDevicePolicies. If it doesn't exist, create a new key with that name.
4. In the StorageDevicePolicy key, create a REG_DWORD value called WriteProtect.
5. Set the data value of WriteProtect to 1.
6. This value will make USB storage read only. To enable read/write over USB, set the value to 0.
7. Exit the editor.
Make sure that you aren't using other USB storage devices such as hard drives or a CD/DVD writer before you set this registry value.
Subscribe to:
Posts (Atom)