Software

Do you need a custom-built command line utility developed to your specifications?  Our prices are very reasonable, and automating part of your business is always worth a one time expense!  Inquire here.

Notes

• These programs run on all versions of Windows since 2000.
• You may distribute these programs as long as they are not modified or sold.  If you would like to package them with a commercial program, please contact us.
• These programs do not have a graphical user interface.  They are meant to run from a command line (DOS prompt), batch file, or shortcut.  You should keep your command line programs in a directory on your hard drive, preferably one in the PATH.  We recommend "c:\windows\system32\".
• By the act of downloading and using these utilites, you must agree to the terms of the End-User License Agreement, which can be found here.  If you do not agree to the terms, you are not authorized to use our software.

Program Index

 BACKUP9.EXE - File Backup Utility
 COMBINE.EXE - File Combining Utility
 DELNEXT.EXE - Delete At Next Reboot Utility
 DELS.EXE - Recursive File Deletion Utility
 DIGSIG.EXE - Digital Signature Verification Utility
 FCMP.EXE - File Comparison
 FIREWALL.EXE - Windows Firewall Configuration Utility
 GPATCH.EXE - File Patching Utility
 GS.EXE - Greg's DOS Shell
 NUMLINES.EXE - Source Code Line Counter
 PECHKSUM.EXE - Portable Executable Checksum Utility
 SIZEOF.EXE - File Size Reporting Utility
 SLEEP.EXE - Power Management Utility
 STARTAS.EXE - Executes a DOS command line under a different user account.
 TIMER.EXE - Timer Utility
 WOL.EXE - Wake On LAN

## BACKUP9.EXE

The BACKUP9.EXE utility will maintain a number of backups (9 by default) of a file.  For example, this command:

backup9.exe c:\baz\foo.bar

Will generate these backup files:

c:\baz\foo.bar.bk1
c:\baz\foo.bar.bk2
c:\baz\foo.bar.bk3
c:\baz\foo.bar.bk4
c:\baz\foo.bar.bk5
c:\baz\foo.bar.bk6
c:\baz\foo.bar.bk7
c:\baz\foo.bar.bk8
c:\baz\foo.bar.bk9

Where foo.bar.bk1 is the most recent backup, foo.bar.bk2 is the next most recent backup, et cetra.  Please note that this assumes that backup9 was called 9 times, and the original file changed each time.

Usage

backup9 [/a] [/e] [/i] [/l#] [/m] [/nologo] [/q] [/s] [/v] filespec [target]

Where filespec is a specification of the file(s) that should be backed up, and target is the path (drive and folder) where the backup files should be created.

Switches:
 /a Always perform backup, even if no change since last backup. /e Replace the source file's extension instead of appending. /i Ignore errors in the file specification. /l Number of backup levels, from 1 to 999 (defaults to 9). /m Maintain the folder structure.  This is only applicable with the /s switch and a target path. /nologo Suppress logo banner. /q Quiet mode - no banner or operation status. /s Recursively enter sub-folders. /v Verbose output (detailed information).

Notes

• The filespec can contain the wildcard characters, the asterisk (*) and the question mark (?).  It can also include multiple files separated by semi-colons.
• If the target directory does not already exist, it will be created.  If no target directory is specified, the backup files are created in the same directory as the source file.
• If either the filespec or target parameter contains spaces, it should be enclosed in quotes.
• No backup is made if the file has not changed since the last backup.
• If a file is locked, backup9 will retry up to 10 times over a one second period.  This is helpful for files that are sometimes briefly locked, like a database.
• Pressing the Escape key will interrupt the operation.

Example #1:  Specifying a Target Directory

backup9 /l3 c:\baz\foo.bar d:\target

Produces these backups:

d:\target\foo.bar.bk1
d:\target\foo.bar.bk2
d:\target\foo.bar.bk3

Example #2:  Wildcard, Long Path

backup9 /l3 "c:\baz\foo bar.*"

Might produce these backups:

c:\baz\foo bar.dat.bk1
c:\baz\foo bar.dat.bk2
c:\baz\foo bar.dat.bk3
c:\baz\foo bar.txt.bk1
c:\baz\foo bar.txt.bk2
c:\baz\foo bar.txt.bk3

Example #3:  Multiple Files

backup9 /l3 c:\baz\foo.dat;bar.txt

Produces these backups:

c:\baz\foo.dat.bk1
c:\baz\foo.dat.bk2
c:\baz\foo.dat.bk3
c:\baz\bar.txt.bk1
c:\baz\bar.txt.bk2
c:\baz\bar.txt.bk3

Example #4:  Replacing Extensions

backup9 /l3 /e c:\baz\foo.bar

Produces these backups:

c:\baz\foo.bk1
c:\baz\foo.bk2
c:\baz\foo.bk3

## COMBINE.EXE

COMBINE.EXE is a program that combines two or more files into a single file.

Usage

COMBINE [/a] [/fl] [/lb] [/nolist] [/nologo] [/nosum] [/s] target file1 file2 ...

Where target is the name of the new file to be created, and file1, file2, etc. are the "source files" containing the data that is to be combined into the new file.

Switches:
 /a Do not overwrite the existing contents of the target file.  Instead, append to the end of the target file. /fl The source file is a list of other source files.  It can contain one or more filepaths of source files, separated by line breaks or semi-colons.  This file can be ASCII, unicode, or UTF-8 (provided that the unicode or UTF-8 byte order mark is present). /lb Before a source file is added to the target file, a line-break will be added to the end of the target file if one is not already present. /nolist Do not list each file. /nologo Do not display the program banner. /nosum Do not display the operation summary. /s Recursively enter subdirectories.

Notes

• The ? and * wildcard characters are permitted.
• If no path to the target file is specified, the target file is created in the current working directory.
• Any filename that contains spaces should be enclosed in quotes.
• You may press Escape to abort the operation.
• Filenames containing unicode characters are supported.

Example

combine foo.txt 1.txt 2.txt 3.txt

This creates a file in the current directory named "foo.txt".  Its contents will be the combined contents of three files:  1.txt, 2.txt, and 3.txt.

Sample Output

Combine 3.0 - File Combining Utility
1.txt: ok
2.txt: ok
3.txt: ok
Combined 3 files (126 bytes)

## DELNEXT.EXE

DELNEXT.EXE will schedule one or more files or directories to be deleted during the next reboot.  This is useful for deleting files that are currently in use (and therefore locked).

Usage

DELNEXT [/d"..."] [/move"..."] [/nologo] [/now] [/pause] [/s] files...

Switches:
 /d The default directory where the files are located.  If omitted, the current working directory is used.  The directory must follow the /d switch immediately (no spaces), and be surrounded in quotes. /move Instead of deleting, the file specified in this switch will replace the target file during the next reboot. /nologo Don't display the program banner. /now Delete the file immediately if possible. /pause Ask the user to press a key before terminating. /s Recursively enter subdirectories.

Example #1

C:\dos>delnext c:\killme.ico
Gammadyne Delete At Next Reboot Utility 5.0 (delnext.exe)

c:\killme.ico ... success

Example #2

C:\dos>delnext /d"c:\windows" /s "foo bar.dll" logon.exe
Gammadyne Delete At Next Reboot Utility 5.0 (delnext.exe)

c:\windows\foo bar.dll ... success
c:\windows\system32\logon.exe ... success

Example #3

C:\dos>delnext /move"c:\temp\foo.dll" c:\windows\foo.dll
Gammadyne Delete At Next Reboot Utility 5.0 (delnext.exe)

c:\windows\foo.dll ... success

Notes

• The * and ? wildcards are supported.
• The operating system will delete the file before any drivers are loaded or services are started.  This makes DELNEXT an excellent tool for ridding a system of viruses.
• Some viruses will detect when one of their files is missing, and restore it.  It is important to delete all of the files associated with the virus.
• Files cannot be located on a network share because they are deleted before networking support is booted.
• Directories must be empty in order to be deleted.
• Deleted files are not moved to the Recycle Bin, they are permanently deleted.  For a good undelete utility, we recommend Back2Life.
• Because the system deletes the file, the presence of delnext.exe is not required.  Hence, delnext.exe can be deleted after it is used.  This makes it useful as part of a software uninstaller.
• The registry key where delayed deletions and moves are located is:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
in the value named "PendingFileRenameOperations".

## DELS.EXE

DELS.EXE will delete a set of files from a directory and all of its subdirectories.  Only one parameter is required:  a specification of the files to be deleted.  The specification can use the ? and * wildcards.  Multiple specifications can be separated with a space or semi-colon.

Usage

DELS [/age##] [/nf] [/nologo] [/nr] [/ns] [/nw] [/q] [/test] filespec [/xf filespec] [/xd folder]

Where filespec specifies the file(s) to be deleted.

Switches:
 /age## Only delete files that are at least this age, in days. /nf Don't list each file as it is deleted. /nologo Don't display the program banner. /nr Don't recursively enter subdirectories. /ns Don't display the operation summary. /nw Don't report warnings in the file specification. /q Suppress all output. /test Test only - no deleting. /xd Exclude each folder that follows this switch. /xf Exclude each file that follows this switch.

Example

For example, Gammadyne uses this to delete all of our object code files:

dels /nf /age7 f:\projects\*.obj;*.sbr;*.res;*.bsc;*.pch;*.ncb

Sample Output:

DELS.EXE 2.0 - Recursive File Deletion Utility

Deleting F:\PROJECTS\AutoTweak\AutoTweak.ncb : ok
Deleting F:\PROJECTS\Scratchboard\Scratchboard.ncb : ok
Deleting F:\PROJECTS\Console\Console.ncb : ok
Deleting F:\PROJECTS\All\All.ncb : ok
Deleting F:\PROJECTS\Eclient\Eclient.ncb : only 3 days old

4 files deleted successfully
1 files could not be deleted
1 files were not old enough
Total size of file specification: 34,741,983 bytes

Notes

• We are not responsible for damage caused by the use of this program, or any other program, even if it contains bugs.  This is a powerful program with the ability to seriously screw up your computer.
• You may press the Escape key to abort the operation once it has started.
• When a file specification contains an absolute path, all subsequent file specifications will be relative to that path (but only when using a semi-colon separator).  Note that the example above depends on this.
• Deleted files are not moved to the Recycle Bin, they are permanently deleted.  For a good undelete utility, we recommend Back2Life.

## DIGSIG.EXE

DIGSIG.EXE verifies the digital signature of a file.

Usage

DIGSIG [/folder] [/nologo] filepath

Switches:
 /folder Instead of processing just a single file, processes all files in a folder.  Press Escape to abort. /nologo Don't display the program banner.

Output

The %ErrorLevel% environment variable will be set to one of the following:

 Code Description -1 Invalid parameter. 0 The signature is present, and was validated successfully. 1 No signature is present. 2 Failed to find the signature. 3 The signature is present, but the file is not allowed. 4 The file is not trusted. 5 Admin policy has disabled user trust. 6 Failed to link to WinVerifyTrust() in WinTrust.DLL. 7 An unknown error occurred. 8 The file does not exist. 9 The file is locked. 10 Unsupported file type. 11 A certificate was revoked by the issuer. 12 A certificate is expired. 13 The signature or certificate is malformed. 14 The signature could not be verified.

Example #1

>digsig c:\work\foo.exe
DigSig 2.1 - Digital Signature Verification Utility

Code 11: A certificate was revoked by the issuer.

Example #2

>digsig /folder c:\work
DigSig 2.1 - Digital Signature Verification Utility

c:\work\foo.exe : No signature is present.
c:\work\bar.exe : The signature is present, and was validated successfully.
c:\work\baz.exe : The file is not trusted.

## FCMP.EXE

FCMP.EXE compares two files, reporting whether or not they are the same.

Usage

FCMP [/e#] [/f] [/i#] [/n#] [/nologo] [/s] [/sdo] [/snp] file1 file2

Compares file1 to file2, and reports if they are the same size and identical, byte for byte.

Switches:
 /e End at specified offset. /f Compare all files in two folders. /i Start at specified offset. /n Compare only the specified number of characters. /nologo Don't display the program banner. /s Suppress all output. /sdo Only compare files if they have the same date (/f only). /snp No error if one of the files has no counterpart (/f only).

Example

fcmp c:\work\foo.txt d:\work\bar.txt

Sample Output:

FCMP 3.1 - File Comparison Utility

Files are identical.

Sample Output:

FCMP 3.1 - File Comparison Utility

Files differ at offset 0
'2' (50) != '1' (49)

Example

fcmp /f /sdo /snp c:\work\ d:\backup\work\

Sample Output:

FCMP 3.1 - File Comparison Utility

Folders are identical.
312 files were matched.

Notes

• File offsets are 0-based.
• The %ErrorLevel% environment variable will contain 0 if the files match, 1 if they do not, or 2 if a file could not be opened or read from.

## FIREWALL.EXE

FIREWALL.EXE is a utility for adding exceptions to the Windows Firewall.

Usage

FIREWALL [/aa] [/ad] [/nologo] [/pa] [/pd] [/q] [/s] [/udp] app/port [name]

Parameters:
 app/port The filepath to the application's executable, or the port number. name Name of the application as it appears in the firewall manager.

Switches:
 /aa Add an application exception. /ad Discard an application exception. /pa Add an port exception. /pd Discard a port exception. /nologo Don't display the program banner. /s Report the firewall's status. /q Suppress all output. /udp For port exceptions, allow the UDP protocol instead of TCP.

firewall /aa c:\work\foo.exe "Acme Utility"

firewall /pa 14337 "Acme Utility"

firewall /pd 14337

Notes

• firewall.exe must have admin rights to manipulate the firewall.
• This utility does not work with other firewalls, only the one built into Windows.

## GPATCH.EXE

GPATCH.EXE will alter a block of bytes in a file.

Usage

First, specify the directory and filename of the file that is to be patched.  Then, specify the /i switch, followed immediately by the 0-based index of where the data should be stored in the file.  The actual data can be specified one of two ways:
• The /s switch, immediately followed by the data, inside quotes.  The data is expressed literally.
• The /h switch, immediately followed by a string of hexadecimal pairs, inside quotes.  Each hexadecimal pair corresponds to a single byte of data.  Each pair can be separated by spaces, commas, dashes, or nothing at all.

In addition, you may optionally specify the /n switch, immediately followed by the number of bytes that is to be deleted at the specified index before the data is inserted at the index.  If this switch is omitted, this defaults to the length of the data, which has the end result of overwriting a section of the file without modifying its size.  If the /n value is less than the length of data, the file will grow.  Likewise, if the /n value is more, the file will shrink.  If /n0 is specified, the data is effectively inserted into the file at the index.

Notes

• To append the data to the file, specify the /a switch instead of /i.
• You may specify multiple /s and /h switches.  The final data will be the concatenation of the data specified by each switch.
• Multiple files can be patched at the same time.  Either list each file, separated by semi-colons.  Or, use the * or ? wildcard.
• The /r switch will recursively enter sub-directories looking for filename matches.
• The /nologo switch will omit the program banner.
• The /nw switch will suppress warnings in the file specification (such as "File does not exist").

Example #1: Changing the 3rd, 4th, and 5th bytes to "abc".

 c:\dos>gpatch f:\g\killme.txt /i2 /s"abc" GPATCH 2.1 - File Patching Utility Copyright (C) 2002-2010 By Greg Wittmeyer - All Rights Reserved Replaced 3 bytes at index 2 in file "f:\g\killme.txt" with "abc" 

Example #2: Inserting "abc" at the beginning.

 c:\dos>gpatch f:\g\killme.txt /i0 /n0 /h"6162 63" GPATCH 2.1 - File Patching Utility Copyright (C) 2002-2010 By Greg Wittmeyer - All Rights Reserved Replaced 0 bytes at index 0 in file "f:\g\killme.txt" with "abc" 

Example #3: Appending "abc" to the end.

 c:\dos>gpatch f:\g\killme.txt /a /s"abc" GPATCH 2.1 - File Patching Utility Copyright (C) 2002-2010 By Greg Wittmeyer - All Rights Reserved Replaced 0 bytes at index 4 in file "f:\g\killme.txt" with "abc" 

Example #4: Deleteing the first 100 bytes.

 c:\dos>gpatch f:\g\killme.txt /i0 /n100 /s"" GPATCH 2.1 - File Patching Utility Copyright (C) 2002-2010 By Greg Wittmeyer - All Rights Reserved Replaced 100 bytes at index 0 in file "f:\g\killme.txt" with "" 

Example #5: Patching multiple files.

 c:\dos>gpatch f:\g\foo?.txt;bar.txt /i0 /n100 /s"abc" GPATCH 2.1 - File Patching Utility Copyright (C) 2002-2010 By Greg Wittmeyer - All Rights Reserved Replaced 100 bytes at index 0 in file "f:\g\foo1.txt" with "abc" Replaced 100 bytes at index 0 in file "f:\g\foo2.txt" with "abc" Replaced 100 bytes at index 0 in file "f:\g\bar.txt" with "abc" 

## GS.EXE

GS.EXE is an alternative DOS shell, with improved editing features, command history, and support for Aero Glass.

Key Features

• Pressing the left arrow key does not perform a backspace, it lets you go back and change something without destroying everything that came after it.
• Pressing the up and down arrow keys will cycle through a history of past commands (including commands from a previous session).
• Pressing the insert key will toggle the editing mode between "insert" and "overwrite".
• Ctrl+V will paste the clipboard into the command line.
• Pressing F7 will display the command history.  You can choose a command and press Enter to run it again, or Escape to cancel.
• Pressing Ctrl+Left or Ctrl+Right will move to the previous/next word on the command line.
• If the "cd" command cannot find the directory, you will be presented with a list of directories that have a similar name or that have the same prefix.  You can then select one of these suggestions.

Configuration

The configuration file fo GS.EXE is GS.INI.  This file is created the first time that GS runs.  Following is a description of each setting in GS.INI.

 Section.Entry Default Description Colors.CurrentPath 15 Color of the prompt (which is the current path and ">"). Colors.CommandLine 14 Color of the command line entered by the user. Colors.Hilite 206 Color of the currently selected directory (when the user is presented with a list). Colors.ExitCode 11 Color of the process exit code (when ReportStatus is 1). Options.ReportStatus 0 If 1, the exit code of a process is reported after it finishes. Options.Glass 0 If 1, the entire background will use the Aero Glass effect. Requires Vista or later. Options.NoHistory 0 If 1, the command history is not recorded between sessions. Options.Transparency 0 The transparency of the console window (from 0 to 255, where 0 is completely opaque).  Please note that if Glass is enabled, this transparency is additive to the transparency that is inherent with Glass.  Unfortunately it is not possible to reduce the transparency of Glass.

Color Codes

A color code is formed by adding a foreground color value to a background color value.

 Color Foreground Background Black 0 0 Dark Blue 1 16 Dark Green 2 32 Dark Cyan 3 48 Dark Red 4 64 Dark Magenta 5 80 Dark Yellow 6 96 Light Gray 7 112 Dark Gray 8 128 Blue 9 144 Green 10 160 Cyan 11 176 Red 12 192 Magenta 13 208 Yellow 14 224 White 15 240

For example, if you want yellow text on a blue background, the color code would be 14 + 144 = 158.

## NUMLINES.EXE

NUMLINES.EXE will count the number of lines in a set of plain text files.  It will also count the number of lines containing actual code (assumes comments are in C++ style).

Usage

numlines [/bom] [/i] [/nologo] [/pause] [/s] filespec

Where filespec is a specification of the files whose lines are to be counted.  The specification can use the ? and * wildcards.  Multiple specifications can be separated with a semi-colon.

Switches:
 /bom Report if each file is ASCII, Unicode, or UTF-8. /i List each individual file. /nologo Suppress program banner. /pause Force the user to press a key before terminating. /s Recursively search subdirectories.

Example

c:\>numlines c:\g\*.h;*.cpp;*.rc
NUMLINES 6.0 - Source Code Line Counter - www.Gammadyne.com

Total files: 694
Total lines: 881,311
Total bytes: 23,630,093 (22.54 MB)
Total blank lines: 152,529 (17.3%)
Total commented lines: 188,461 (21.4%)
Total lines containing only a brace: 81,193 (9.2%)
Total semi-colons: 322,173
Total uncommented, non-blank, non-brace-only lines: 459,128 (52.1%)
Average lines per file: 1269
Average bytes per file: 34,049
Average bytes per line: 26.8
Elapsed time: 749 milliseconds
Report date: 1/21/2017 11:21:08 a.m.

Outputting to a File

The output can be redirected with the > operator, like this:

numlines c:\work\*.txt > c:\foo\count.txt

Commentary

The number of lines of code is a poor indicator of the quantity and quality of a programmer's work.  In fact, a programmer's skill is inversely proportional to the number of lines of code used to solve a problem.  Bad programmers often copy blocks of repetitive code instead of eliminating the repetition with functions.

## PECHKSUM.EXE

PECHKSUM.EXE reports or updates the checksum of a Portable Executable (PE) file, which includes Windows executables and DLL's.

Usage

PECHKSUM [/nologo] [/q] [/r] filespec

Switches:
 /nologo Don't display the program banner. /q Quiet mode - suppress all output. /r Report existing checksum only - do not update checksum.

Example

pechksum c:\work\foo.exe

Sample Output:

PEChkSum 1.2 - Portable Executable Checksum Utility

C:\work\foo.exe : OK
Old checksum: 0 (0x00000000)
New checksum: 1881027 (0x001CB3C3)

Notes

• The file specification can utilize the asterisk and question mark wildcards.  Multiple files can be specified by separating them with a semi-colon.
• The %ErrorLevel% environment variable will contain 0 on success, 1-99 for parameter error, or 100 for failure.

## SIZEOF.EXE

SIZEOF.EXE reports the total size of a set of files in bytes, kilobytes, and megabytes.

Usage

sizeof [/f] [/logo] [/n] [/r#] [/s] [/w] filespec [/e exclusion]

Where filespec is a specification of the files whose sizes are to be counted.  The specification can use the ? and * wildcards.  Multiple specifications can be separated with a semi-colon.

Switches:
 /f List each file. /logo Display the program banner. /n Display the size as an unformatted integer. /r# Return the total size as the process exit code (%errorlevel%). 0=bytes, 1=KB, 2=MB. /s Recursively search subdirectories. /w Suppress warnings in the file specification. /e Exclude files that follow.

Example

sizeof /logo /s c:\work\*.cpp;*.h /w /e test.*

Sample Output:

SizeOf 3.0 - File Size Reporting Utility

Total bytes: 10,219,404 (9979.89 KB) (9.75 MB)
Total files: 236   Average size: 43,302 bytes
Smallest: 238 bytes   Largest: 1,053,545 bytes

## SLEEP.EXE

SLEEP.EXE will make the computer enter a power-saving state.

By default, SLEEP.EXE makes the computer enter "suspend" mode.  The state of the operating system is stored in RAM, which will remain powered.  The advantage to this mode is that the computer can be woken up quickly.  Pressing any key will bring the computer back to normal operation.

SLEEP.EXE can also make the computer enter "hibernate" mode by specifying the /h switch.  The state of the operating system is stored on the hard drive.  The computer will take much longer to wake up than "suspend" mode, but because there is no need to power the RAM, almost no electricity is used.  It is necessary to press the power button to wake the computer from hibernation.

Usage

SLEEP [/f] [/h] [/nologo] [/nr] [/ns] [/r] [/w#]

Switches:
 /f Force the computer to sleep.  Otherwise, any running application will be able to prevent the computer from sleeping if it so chooses. /h Hibernate instead of suspending.  Go here for an explanation of how to enable hibernation. /nologo Suppress the title banner. /nr Don't report the current power status. /ns Prevent entering sleep mode.  The power status will still be reported. /r Reboot instead of suspending. /w# Wait for the specified number of milliseconds.  This does not enter sleep mode, it simply pauses before the sleep.exe process terminates.

Example

c:\dos>sleep
Sleep 2.4 - Power Management Utility

AC Line Status: Online
Battery charge: No Battery
Entering sleep mode...ok

Notes

• SLEEP.EXE uses the SetSuspendState() API function in Kernel32.dll.
• SLEEP.EXE works on Windows 98/ME/2000/XP/2003/Vista/2008/7/8/2012/10.  It does not work on NT through version 4.0.

## STARTAS.EXE

STARTAS.EXE will execute a DOS command line under a different user account.

Usage

STARTAS [/dir"..."] [/hide] [/profile] [/max] [/min] user password cmdline...

Switches:
 /dir Set the current working directory for the process. /hide The process's window should be initially hidden. /profile Load the user's HKEY_USERS registry key. /max The process's window should be initially maximized. /min The process's window should be initially minimized.

Example

startas /dir"c:\foo" /profile Gandalf Belloch copy foo.txt bar.txt

Notes

• The user name can optionally be in the form of "user@domain".
• Everything after the password is considered the command line to be launched.  Do not enclose the command line in quotes.
• The command line is executed in a separate console window.

## TIMER.EXE

TIMER.EXE is used to measure the length of time that other command line operations take to finish.  When executed with no parameters, the timer is started.  If the "/s" switch is specified, the elapsed time is output to the console.

Usage

TIMER [/et] [/n] [/nologo] [/q] [/r] [/reset] [/s]

Switches:
 /et When stopping the timer, display the current date and time. /n Display the elapsed time numerically (e.g. hh:mm:ss.uu) /nologo Suppress the title banner. /q Quiet mode - do not report current time when starting timer. /r Report the elapsed time without stopping the timer. /reset Delete all existing start times. /s Stop timer and report elapsed time.

Example

c:\dos>timer
Timer started: 8/27/2010 2:27:17 p.m.

c:\dos>timer /s /nologo
4.5 seconds

Notes

• The file TIMER.TXT is used to record the time that the timer started.  This file is created in the same directory as TIMER.EXE.
• Each call to TIMER.EXE without the /s switch should be balanced by one call with the /s switch.  Nesting is supported.

## WOL.EXE

WOL.EXE is a utility that turns on a computer remotely.  It broadcasts a "Wake On LAN" packet to the Network Interface Card (NIC) with the specified MAC address.  The MAC address may optionally be followed by the IP address of the network adapter that should broadcast the packet.  A port number can also be specified, although this is rarely necessary.

Example

wol 5c9d32b5f287

Example

wol 5c-9d-32-b5-f2-87 192.168.0.1

Example

wol 5C:9D:32:B5:F2:87 192.168.0.1 16962

Notes

• The motherboard must support Wake On LAN.
• The NIC must support Wake On LAN.
• For add-on network cards, there must be a wire connecting the motherboard's WOL port to the NIC's WOL port.
• The Wake On LAN feature must be enabled in the motherboard's BIOS.
• The "Good Connection" light on the back of the NIC must be lit when the machine is off.
• Port 12287 (0x2FFF) must be open, however we've never seen Windows block this port.
• Packets cannot be broadcast across the Internet.  That's why they call it Wake On Lan, not Wake On Internet.
• To find a computer's MAC address, run the MSINFO32.EXE tool that is part of Windows.  Navigate to Components > Network > Adapter.
• It may be necessary to specify the adapter IP in order for the packet to pass through some switches.

Source Code