Documentation for RUNFILE.EXE utility.

Introduction License Breathware Installation Usage Errors

Download runfile.zip


Introduction

Written by David McNab, david@rebirthing.co.nz,
Published by Rebirthing New Zealand, http://www.rebirthing.co.nz
Version 1.01, updated Jan 20, 2000

Runfile is a very small but handy utility for launching files, shortcuts, URLs and dial-up connections via command line arguments, without needing a console window, and without needing the Start Menu 'Run' command.

Also, it allows the execution of .bat files and other console-based programs, without the ugly 'DOS console window' popping up every time.

It is targeted as a useful tool in system automation - particularly, in conjunction with utilities which are not capable of launching shortcuts to applets.

For Windows 95, 98, 2000 only.
It may even work on NT - try it!

Please send bug reports, suggestions for improvements etc to runfile@rebirthing.co.nz


License Back to top

Runfile is Copyright (c) 2000 by David McNab, david@rebirthing.co.nz.
All rights reserved.
Developed as a freeware utility as a gesture of giving something back to the internet community, in exchange for all of the wonderful freeware I have downloaded.

Technically, RUNFILE is 'breathware'.
If you use this program, and find is useful, then I invite you to read and do the exercise in the next Section.

Under NO circumstances may you sell this program, (unless as part of a commercial shareware/freeware compilation, with no less than 10 other software titles)

Use of this program is at your own risk. Author will not be held responsible for any adverse effect on your system through use or misuse of this program.

This program may be freely distributed, as long as:
1) It is not modified in any way
2) This Runfile.html file is included without alteration


Breathware Back to top

Spare three minutes and try the following exercise:
1. Take in twenty fast, full, connected breaths through your mouth
2. In your mind, complete the sentence, "Something I can do to make my life more enjoyable is..."
3. Tune into your body, relax, and reflect on your answer
4. Take 20 more connected breaths
5. In your mind, complete the sentence, "Something I can to to make other people's lives more enjoyable is..."
6. Take 20 more connected breaths, this time slower
7. Affirm to yourself, "I now receive greater love and warmth in my life"

If this makes you curious, visit me on the Rebirthing New Zealand website, http://www.rebirthing.co.nz


Installation Back to top

Very simple.
Just copy Runfile.exe and Runfile.html to C:\Windows


Usage Back to top

There are 4 modes -

Launch a file

Syntax: runfile filename args

filename is the full pathname of the file to be launched.

args is optional, and will be passed to the program being launched.

Examples:

runfile "c:\program files" Opens a directory window for Program Files folder
runfile c:\windows\notepad.exe Runs the Windows Notepad.exe program.
runfile "c:\windows\desktop\control panel.lnk" Opens the Control Panel (assuming you have the Control Panel shortcut on your desktop, and it is called 'control panel').

Launch a .BAT file or other Console program Back to top

Syntax: runfile CMD=Dos Command

Runs a DOS command, .BAT file or other console-based process without the ugly black DOS console window popping up every time.

Full DOS command processing syntax is supported, including Input/Output redirection and pipes.
Note: if you want to know the output of a command or console program, you will need to explicitly redirect its output - see examples.
(Sadly, I don't know how to support redirection of output from .BAT scripts. COMMAND.COM doesn't seem to support it. If anyone knows, tell me).

Also, see below for a neat idea (*) for setting up file types.

Examples:

runfile CMD=c:\myfiles\myscript.bat Runs myscript.bat and discards its output
runfile CMD=perl c:\myfiles\prog.pl Runs perl script prog.pl (assumes you have a perl interpreter installed.
runfile CMD=perl c:\myfiles\prog.pl > c:\myfiles\prog.lst Same, but saves perl output in prog.lst

Neat Idea (*)

Run perl scripts and other programs without the DOS Console window.

For file types associated with console programs (eg Perl scripts), set up the file type to run runfile on open.
For example, for Perl scripts: Run the windows explorer, click on View, then Options, then File Types, and select (or create) the .pl type. Set the command for the 'open' action to:

c:\windows\runfile.exe CMD=C:\Perl\bin\Perl.exe "%1" %* > "%1".lst

That way, when you double-click on the icon for perl script myperlscript.pl, the script will be executed, and its output will be placed in a file called myperlscript.pl.lst

If you like playing around in the system registry, you can also set up .bat files to open under runfile.exe. (The command for this is "C:\Windows\runfile.exe CMD="%1" "%*".) To do this, you will need to find the entries that define the action for opening .bat files and .pif files. (What I have done on my system is set up the Open action to run .bat scripts under runfile, and created a new action called OpenDosBox which runs bat files in the old way (with the ugly DOS window, for those rare situations when I need to see the output).

 

Launch a Dial-up Connection Back to top

Syntax: runfile DUN=Connection_name

Launches the dialup connection 'Connection_name'
Note: the keyword DUN must be uppercase.

 

Launch an Internet URL - web page, mail to, ftp etc Back to top

Syntax: runfile URL=url_spec

Launches a web page, ftp connection etc.

'url_spec' can be anything which can be typed into an internet browser
Note: the keyword URL must be uppercase.

Examples:

runfile URL=http://www.amazon.com
runfile URL=ftp://ftp.myhost.com
runfile URL=mailto:someone@somewhere.com
runfile URL=file:///c:/program%20files


Errors Back to top

Due to the simplicity of this program, error information is very limited.
If the filename does not exist, nothing will happen.