Tech Support > Operating Systems > MS-DOS > Running 4Dos in a Custom window in Window 95/98/ME
Running 4Dos in a Custom window in Window 95/98/ME
Posted by William Allen on March 25th, 2005


Running 4Dos in a Custom window in Window 95/98/ME

SUMMARY:
How to install the (now free) 4Dos for Windows 95/98/ME in a Custom
window without affecting any other Windows 95/98/ME MS-DOS Batch
operations. This post gives full details of how to configure the
Custom 4Dos window to run from a Desktop icon. This is ideal for
those who want to try 4Dos now it's free, without having to commit
themselves to using it for any existing operations.

For some, it could make 4Dos an ideal generalised third-party batch
utility, adding a new Batch command-line interface to your system
and eliminating the need for a host of other third-party utilities.
Note (d) at the end shows how to run 4Dos Batch files from an ordinary
MS-DOS command line outside the Custom 4Dos window using a pre-loaded
DosKey macro (syntax example included).

DETAILS:

4Dos for Windows 95/98/ME is now free (Klaus Meinhard first drew my
attention to this). Many Windows 95/98/ME users may not realise it
can be added to their system and run in a Custom MS-DOS-style window
for educational and practical purposes in a way that does not
otherwise affect their Operating System. Run in this way, it can be
invoked from a DeskTop Shortcut just like any other third-party
software, and even run alongside a Custom MS-DOS window for comparison.

This is ideal for those who want to dip a toe into 4Dos, but don't
want to commit to it. Installing 4Dos in this way won't affect your
other Batch operations, but you'll be able to play with 4Dos whenever
you like in the Custom window.

You can download the free Win95/98/ME 4Dos complete package from
http://www.jpsoft.com/download.htm
See item near end of that page: "Older Unsupported (FREE) Products."

You can also freely download your own choice of individual 4Dos
components from ftp://jpsoft.com/4dos/files/

Before downloading 4Dos:
Create a new folder, say C:\OTHER\4DOS (choose a path with a
short 8.3 style path name or use the short name of any long
folder path), it will make installation below slightly easier.
To find the short form path to a long folder, see our Batch
Reference Session: http://www.allenware.com/icsw/icswref.htm

A suitable minimum set of files for the installation below would be:
4dos.com 4dos.hlp 4help.exe 4dos.ico from the component site:
ftp://jpsoft.com/4dos/files/
(and you may want to read the intro.txt and readme.txt files as well)
Download them directly into the folder you created (C:\OTHER\4DOS).

The 4dos.ico file isn't essential, of course. If your system doesn't
download .ICO files by double-clicking on them, try this:
In the FTP browser window:
(i) Right click the 4dos.ico file
(ii) Click "Copy to folder"
(iii) Use "Browser for folder" dialogue box to locate C:\OTHER\4DOS
(iv) Click OK to download the file to your chosen folder

How to run 4Dos in a Custom window

(1) Create folder C:\OTHER\4DOS if you haven't done so already
(chose your own name and use it below)
(2) As minimum, place 4dos.com 4dos.hlp 4help.exe 4dos.ico in the
folder: C:\OTHER\4DOS (if you didn't download them directly to it)
(3) Right click on a blank area of your DeskTop, and from the context
menu that opens, click on New, Shortcut
(4) In the "Create Shortcut" dialogue that opens, type the command line:
C:\OTHER\4DOS\4dos.com /e:4096 /k CLS
(use the actual folder you have chosen; the purpose of the switch
combo /e:4096 /k CLS is explained below). Click "Next" button
(5) In the "Select a Title for the program" dialogue box, change the
"4dos.com" to read simply: 4dos
Click "Next" button
(6) The Select Icon dialogue should pick up the 4dos.ico file for you,
and use the standard 4Dos icon, so just click "Finish" button
(7) The new Shortcut will appear on your Desktop and the icon will
quickly change to the 4dos.ico icon
(8) Make a new working folder to use for 4Dos, say C:\WORK4

How to configure the new Shortcut:

(9) Right-click the new Shortcut, click Properties, and click the
"Program" Tab. Change the title that is highlighted in the
topmost field from "4DOS" to "Custom window" (don't include
the "quotes")
(10)Still in the Program Tab, change the "Working" folder to the
new working folder you created in (8), say C:\WORK4
(11)Still in the Program Tab, in the "Batch File" field, enter:
SET PATH=C:\OTHER\4DOS;%PATH%
(instead of C:\OTHER\4DOS of course, use the actual folder you
placed the 4Dos files in, and notice that [;] semi-colon)
This will ensure that the 4Dos files are in the PATH when you
use the Custom 4Dos window. This assumes you don't want the
4Dos folder in the PATH for all other work (too many folders
in the default system path may slow down file handling).
(12)Still in the Program Tab, make sure the "Close on exit" box
is checked
(13)Next, click the "Font" Tab of the Shortcut properties
(14)In the Font Tab, check the radio button for Both Types (to include
bitmap and TrueType fonts, assuming you have TrueType fonts
available on your system)
(15)In the Font Size pull-down dialogue choose a suitable size: the
size closest to 9x15 or 8x14 works well on many monitors. The size
of font you choose sets the maximised size of the Custom window
you are creating
(16)Next, in the Misc Tab of the Shortcut properties, make sure the
"Always suspend" check box ISN'T checked (it shouldn't be)
Click the OK button to save changes to the Shortcut Properties
(17)Now double-click the new Shortcut to open your Custom window. It
will probably open "restored" (with scroll bars and single square
in middle of three controls in top corner). Click on the maximise
control (the single square) in the top right row of three controls
(-[]x) in the title bar, which should have title:
Custom window - 4DOS
Position the new Custom window as you prefer it. The Shortcut
will "remember" its size and position on screen for next time
(18)The MS-DOS style screen in the window will open with an MS-DOS
style prompt: c:\work4 (or whatever folder you chose for working)
(19)To use the 4Dos help system, at the prompt, type the command:
4help
To exit the help system quickly, use [Alt]+[F4] or [Ctrl]+[C].
To back up a page in the help system, press [Esc]
(20)To close the 4Dos Custom window: at the prompt, type the command:
exit
This ends your 4Dos session and the window will close itself.

You'll be able to have an MS-DOS window and the 4Dos window in use
in the GUI at the same time to compare the two environments.

Notes:
(a) The usual 4DOS copyright message won't appear when your Custom
window opens - this is the effect of the "/k CLS" added to the
program name when we created the Shortcut. The /k ensures the CLS
is executed as the first instruction when the 4Dos shell opens.
The /e:4096 sets 4096 bytes of environment space for your 4Dos
Custom Window, which is plenty for most purposes (the default
would otherwise be quite small - about 160 bytes spare only).
NOTE: Changing the Environment setting in the Memory Tab of the
Properties dialogue for your Shortcut will NOT create any extra
environment space for 4Dos (since it doesn't inherit any memory
space you add in this way).
(b) You can get an explanation of any of the items in the Properties
dialogue Tabs of the Shortcut by clicking on the [?] in the top
corner and dragging-and-dropping it on to the item you are
interested in. You can copy the contents of the tooltip-style help
window that opens by right-clicking on it, and clicking Copy.
Use [Ctrl]+[V] as normal to paste the help text elsewhere.
(c) The Introduction to our Batch Course uses on-screen CueWindows
and detailed illustrations to take you through a similar process
to build a custom MS-DOS window ideal for Batch file work. See
Lesson Index and Course Syllabus at:
http://www.allenware.com/icsw/icswidx.htm
(d) If, after playing with 4Dos you want to slightly increase your
commitment to it, you could then add the following lines to your
AUTOEXEC.BAT (CMDINIT.INI for Windows ME)

:: Add 4Dos folder to path
SET PATH=C:\OTHER\4DOS\4DOS.COM;%PATH%
:: Create DOSKEY macro to run 4Dos batch files in MS-DOS
doskey run4dos=C:\OTHER\4DOS\4DOS.COM /e:4096 /c $*

(instead of OTHER, you should use whatever pathname you chose
when installing 4Dos as above). If you're unsure about what that
DosKey line and $* means, read the /? help for Doskey:
doskey /?

Now you can run 4Dos Batch files from the ordinary MS-DOS command
line (entirely outside your Custom 4Dos window) with the syntax:

C:\WORK>run4dos My4DosBatch.bat

In Windows 95/98, if you don't already load DosKey, you may want to
add a further line (before the lines suggested above) to your
AUTOEXEC.BAT file to load DosKey as standard:

:: Load doskey, handy if any DOSsing around is required
LH doskey /bufsize:1024 /line:255 /insert> NUL

In Windows ME, DosKey is usually loaded by default.

This example shows the Doskey macro in use (here I've just loaded
it temporarily from the command line) to run a 4Dos Batch file from
the ordinary MS-DOS command prompt in Windows 95:

============Screen capture Windows 95
C:\WORK>ver

Windows 95. [Version 4.00.1111]


C:\WORK>type my4dosbatch.bat
@ECHO OFF
ECHO. Use 4Dos _ENV variable as follows
ECHO. Environment space left=%_ENV%
ECHO. Parameters passed were: %1 %2 %3 (and so on)

C:\WORK>doskey run4dos=C:\OTHER\4DOS\4DOS.COM /e:4096 /c $*

C:\WORK>run4dos my4dosbatch.bat one two three
Use 4Dos _ENV variable as follows
Environment space left=3732
Parameters passed were: one two three (and so on)

C:\WORK>
============End screen capture
Remember to use your chosen path where I've used the demonstration
path: C:\OTHER\4DOS\4DOS.COM

--
William Allen
Free interactive Batch Course http://www.allenware.com/icsw/icswidx.htm
For example Batch Files see: http://www.allenware.com/find?BatchLibrary
Creative Technical Writing - Allen & Company: http://www.allenware.com/


Posted by Klaus Meinhard on March 25th, 2005


William Allen wrote:

.... lots of good tips for installing 4DOS...

Please see my 4DOS Installation FAQ page

www.4dos.info/4dinstfq.htm

for a few more tips.

A few remarks:

Under Windows simply use the original Installer file. You can install
4DOS very quickly and without fuss with the default values. If you don't
run Windows, just extract the files from the Installer file with any dos
unzip utility (even under plain DOS).

To keep command.com and 4DOS batches separate, use the (preferred) btm
extension for 4DOS, bat (or, under NT, cmd) for command.com or cmd.exe.
Under Windows, add the necessary association with explorer or by editing
the registry. While you're at it, add a "Run with 4DOS" entry.

??? Esc will close the help system, bringing you back to the 4DOS
command line


Hitting the F1 key will bring up the help system. If there's a command
on the command line, the help will be pertinent to that command (that
goes for functions and internal vars, too). You can write a key alias so
that the 4DOS window closes with e.g. ALT-F4.

I think you can skip this. You can better edit the size of the
environment in the 4DOS.ini file. See the help for other useful inifile
directives or use the option command to set most of them interactively.
If 4DOS is in your path, you can then simply type 4DOS mybatch(.btm).
Remember, too, that there is a 4start.btm that gets executed every time
that 4DOS starts. This is a good place to handle 4dos actions depending
on shell level, file extensions (bat or btm?) and the like.

4DOS command line editing is much better than doskey, and other doskey
functions are handled by aliases. See these topics in the help system
(searchable with F6, see F10 too).

Note that under plain DOS and Windows up to 95/98/ME you will always
load 4DOS on top of command.com this way, with a penalty in available
free ram.

If you consider to use 4DOS regularly, consider to make it the primary
shell by editing the SHELL= statement in your config.sys. See the help
for more info. You can always run your MS-DOS batches with an alias
starting command.com for them :-)


--
* Klaus Meinhard *
www.4dos.info
- 4DOS Info -
- Info for DOS -




Posted by Charles Dye on March 26th, 2005


On Sat, 26 Mar 2005 00:51:10 +0100, "Klaus Meinhard"
<K_Meinhard@t-online.de> wrote:

And Alt-X will close the help system without clearing the screen,
which can be handy.

Lesser-known feature: Pressing Control-F1 will bring up help for the
word at the cursor, instead of for the first word on the command line.

In fact 4DOS never calls the DOSKEY API. Unless you use Microsoft's
shells, DOSKEY is a complete waste of memory.

One thing that is worth installing is ANSI.SYS. BIOS console support
has various minor color-related bugs, e.g. colors 'bleeding' from the
bottom line to subseqent lines when the screen scrolls. Loading ANSI
will usually prevent these annoying artifacts.

--
Charles Dye raster@highfiber.com


Posted by William Allen on March 26th, 2005


"Klaus Meinhard" wrote in message
....snip
The .BTM extension is particularly useful for TextPad users trying
4DOS for the first time, since you can download a syntax highlighting
file free from the TextPad site (find item "4DOS (2) Extended syntax
definitions") on page: http://www.textpad.com/add-ons/syna2g.html

If you then define a .BTM document class for TextPad and point
it to the 4dos.syn file you've downloaded, any .BTM file opened
in TextPad automatically has 4DOS syntax highlighting.

--
William Allen
Free interactive Batch Course http://www.allenware.com/icsw/icswidx.htm
For example Batch Files see: http://www.allenware.com/find?BatchLibrary
Creative Technical Writing - Allen & Company: http://www.allenware.com/



Posted by Klaus Meinhard on March 26th, 2005


William Allen wrote:

.... and of course these files, including a very recent upgrade to
current 4NT / TC syntax elements, and syntax highlight files for other
editors are easily found on my 4DOS pages. See the 4DOS Tools page :-)

--
* Klaus Meinhard *
www.4dos.info
- 4DOS Info -
- Info for DOS -



Posted by William Allen on April 7th, 2005


"William Allen" wrote in message

An updated version of this post is now downloadable from our Website.
The ZIP includes a 4dos.ini file that you can use to intialise 4Dos to
start with the usual MS-DOS insert mode / underscore cursor
conventions for editing command lines typed in the Custom window.
Use Insert key as normal to switch to overstrike mode / block cursor
(the usual MS-DOS convention).

4dosguide.zip from: http://www.allenware.com/mcsw/4dosguide.zip

--
William Allen
Free interactive Batch Course http://www.allenware.com/icsw/icswidx.htm
For example Batch Files see: http://www.allenware.com/find?BatchLibrary
Creative Technical Writing - Allen & Company: http://www.allenware.com/
Header email is rarely checked. Contact us at http://www.allenware.com/



Posted by Klaus Meinhard on April 8th, 2005


William Allen wrote:

Link added to my http://www.4dos.info/4docs.htm page. :-)


--
* Klaus Meinhard *
www.4dos.info
- 4DOS Info -
- Info for DOS -



Posted by William Allen on April 9th, 2005


"Klaus Meinhard" wrote
Noted, thanks. We've placed a link to your installation guide in our
4Dos Guide, as follows:

===quoted from "4dosguide.txt" version 1.01
You can read further installation information that will be useful
as you become more committed to 4Dos at Klaus Meinhard's Website:

http://www.4dos.info/4dinstfq.htm

===quote ends

The now free 4Dos for Windows 95/98/ME really is an astonishingly
good value add-on for those who use Batch files. Why bother with
the usual eclectic collection of third-party utilities when you
have a powerful addition that has _lots_of_built-in_help a few
keystrokes away (and which doesn't grumble at you if you don't read
it all the first time). That's where the assorted third-party
utilities often fall down badly - it's irritating to deal with
someone's eccentric idea of a command-line interface and have no
quick help for their (obvious-to-them-but-not-you) syntax.

We think that an easy, no-commitment, way into becoming familiar
with 4Dos will help people get confident with using it. It's likely
that people will then want to take it further and use your ideas.

--
William Allen
Free interactive Batch Course http://www.allenware.com/icsw/icswidx.htm
Batch Reference with examples http://www.allenware.com/icsw/icswref.htm
Header email is rarely checked. Contact us at http://www.allenware.com/



Posted by Klaus Meinhard on April 9th, 2005


Hi William

Also noted :-)

As you said in another posting, it's almost like cheating :-)

Anybody who has worked so hard to learn to get simple things done in
plain MS-DOS will get that feeling. And some people who spent the last
few years here peddling their tools are of course strictly against 4DOS
:-)

BTW, I have enjoyed your very well thought out and brilliantly
formulated postings re topicality and clarity in the alst few days.

--
* Klaus Meinhard *
www.4dos.info
- 4DOS Info -
- Info for DOS -



Posted by Herbert Kleebauer on April 9th, 2005


Klaus Meinhard wrote:

Can you give me a single reason why somebody should use 4DOS?
If you are allowed/want to use an external program, you can use
a real shell like bash (and other Unix tools). The advantage of
the original command.com/cmd.exe is, that you can use it on
any Windows standard installation. 4DOS is neither available
on a standard installation nor has it the power of bash, so
I can't see any logical reason to use it.

Posted by Klaus Meinhard on April 9th, 2005


Herbert Kleebauer wrote:

Allowed? Who is there to do so? With what right? Frequently postings
here foster solutions using dubious "nonstandard" tools, complex progs
or even whole programming languages on the unwary, who has soon a whole
directory full of these tools each with different syntax and standards.
Here is one tool to make most of the others redundant.

What's a real shell, and why doesn't 4DOS qualify? What would be the
advantage for a dos user to use a completely different shell, where all
conventions/commands are different, when he can use a command.com
replacement that is 95% command syntax downwards compatible with what he
knows?

I have no personal experience with bash, and I doubt from your lines
that you have much experience with 4DOS. I have heard from several
professional people I have reason to trust who know bash and 4DOS both
that 4DOS is much easier and more powerful to use. Have you anything
more than your stated opinion to prove otherwise?.

Since 4dos is free, and CDROMs or even floppies are not too expensive,
you can take your environment inluding 4dos with you wherever you go and
even install it on other systems. You can use it from that CD without a
reboot, so it's faster than using bash (oh, there's a bash port by
Hubert Schellong which doesn't need a reboot, but it doesn't come near
4dos).

If you really are often in the situation that you have to administer
somebody else's system, and without your personal tools on CDROM, you
should rethink your habits. One can be so much more productive.

--
Mit freundlichem Gruß,

Klaus Meinhard




Posted by Herbert Kleebauer on April 10th, 2005


Klaus Meinhard wrote:
With "allowed" I mean, that in a company you maybe are
not allowed to install external software on a computer
so you have to use command/cmd. And with "want" I mean,
that, even if you are allowed to use external software,
there are some good reasons to still use command/cmd
so the script will run on any standard installation
without prior installing an external program.


That's the problem. If 95% are compatible with a real crappy
command interpreter like command.com, how can it make the last 5%
a "great tool"? Why not use a well designed scripting language,
ported from an operating system which is known for its good
scripting abilities?


Maybe 4DOS is easier to learn, if you already know command.com.
But once you are used to sh/csh/bash, I don't think it is easier to
write a script for 4DOS than for sh/csh/bash (at least when it is
not a trivial script). And if 4DOS is 95% compatible with command.com
then we don't need to discuss which one is more powerful.


What does this mean: "it doesn't come near 4dos"?


If you are often in a situation where the abilities of cmd.exe
(command.com is obsolete, which company still uses Win9x?) are
not sufficient, wouldn't it then not better to spend the time
to learn the use of powerful tools (even it needs 100x the times
of learning 4DOS) instead of using a 95% command.com compatible
software? And it is also not a bad idea to learn all the tricks
necessary to solve a problem with cmd itself. This way you also
can do your job if you have forgotten your "4DOS CD". So I still
see no logical reason to use 4DOS.

Posted by Michael Bednarek on April 10th, 2005


On Sun, 10 Apr 2005 05:48:52 +0200, Herbert Kleebauer <klee@unibwm.de>
wrote in alt.msdos.batch:

You commit a logical fallacy here: that 4DOS is 95% compatible with
Microsoft's CLIs does not preclude a vastly superior feature set in
4DOS. It certainly does not mean that 4DOS exceeds Mcrosoft's CLIs by
5%.

Those 5% are just the nonsense that users of CMD.EXE/COMMAND.COM have to
put up with, which 4DOS refused to follow and where 4DOS has different,
but much more effective tools (those baroque environment variables in
FOR spring to mind, which, incidentally, are rather well implemented in
4NT - no need for kludges like ENABLEDELAYEDEXPANSION and such).

Furthermore, what's your guess for the degree of compatibilty between
the various Microsoft CLIs?

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"

Posted by William Allen on April 10th, 2005


"Herbert Kleebauer" wrote in message
I write as someone who currently runs a company (albeit a small
partnership) but who has previously been partner in charge of a
fair size IT department.

Among the problems for a company with software that's not part
of the standard installation are:

(a) The new software has to be tested for viruses, bugs,
and conflicts with the current setup. This takes IT-dept time
(b) The new software may cause copyright problems if "amateur"
third-party software is put to commercial use and the author
suddenly decides to "demand" some share of the benefits
(c) Other staff may/will need the item, and will have to be trained in
the item's use (not just the original enthusiast who wants it)
(d) Will there be further issues of the software so it's compatible
with future Operating Systems?
(d) Staff need to be discouraged from installing any old piece of
software that they please, so there needs to be an authorisation
process and proper decisions by the directors or partners

Directors/partners may have to sit down and thrash out these problems
for every new piece of software that an enthusiast on the staff wants
to install.

It helps if the software has a well-tested history, lots of existing
users, and a clear copyright position. It's also much more persuasive
if the item in question has a huge range of uses/features, so that one
decision to allow it will have many benefits.

It also helps the IT department if the item has plenty of built-in
help, properly written, to which they can re-direct help requests.

4Dos meets those requirements, which is why we decided to offer
our (small) support by showing how it can now be used without any
interference with your operating system in Windows 95/98/ME.

The fewer of these decisions the directors/partners take, the more
staff are discouraged from calling for miscellaneous installs. Again
the big utility with wide applications scores. The small utility with
a peculiar command-line interface, no built-in help, and no clear
statement of its copyright or idea of future development fails.

With 4Dos, the clear idea from JPSoft is: make it free for Windows
95/98/ME and people will try it, some will get to like it and may
persuade their directors to buy the Windows XP version. This is a
fair and sensible strategy by JPSoft that any director or managing
partner will fully understand.

--
William Allen



Posted by Klaus Meinhard on April 10th, 2005


Herbert,

If there really is a company that, to belabour my favorite example, asks
it employees to use command.com to get the current date and time into a
variable or/and a filename, or to wait 10 seconds, or... , and pays it's
employees for the time they need to hunt around for these partly
ingenious, but not really business strength, solutions, it'll go broke
next week anyway :-)

No, this argument really is only a week excuse. If you are allowed to
work at command.com level in a company, you probably can get allowance
to use your own free or licensed software too.

You misunderstood: I wrote "downwards compatible", in other words: 95%
(at least) of command.com syntax is exactly the same in 4DOS, but then
you get hundreds of new commands, functions, internal variables,
aliases, better command line editing, fast dir switching, more free DOS
memory, and...

4DOS btm language is a well designed scripting language. If you doubt
that, take a look at some of the 4DOS batches on my site to see what
amazing games, apps and tools can be written in it. I haven't seen
anything comparable in bash script. 4DOS was designed by one company, so
is internally very consistent. The many Unix apps and filters you need
to cobble together a Unix script were written by many different persons,
so my bet is that they are much less consistent syntactically than 4DOS.

As already mentioned, I have no personal experience with Linux/Unix, but
I have often read 4DOS favourable compared with bash, and there were
several request to port 4DOS to Linux in the support forum.

Re functionality, ease of use etc

Sorry, we're at alt MSDOS.batch, and for the CMD.EXe world I much prefer
4NT.

See above. You contradict yourself: If you're not allowed to use 4DOS in
a company, do you imagine they'll let you change their OS? Most of your
arguments hinge on your misunderstanding of my "95% downwards
compatible", and I hope I cleared this up.

Like it or not, the majority of systems run a Windows flavour. Free 4DOS
is a good and _very_ powerful shell that keeps the incline of your
learning curve manageable but very rewarding. Upgrading to NT/XP you'll
find 4NT ready, _downwards_ compatible to 4DOS and cmd.exe.

Do yourself a favour and at least inform yourself about 4DOS. It would
make this discusiion much more fruitful.


--
* Klaus Meinhard *
www.4dos.info
- 4DOS Info -
- Info for DOS -









And it is also not a bad idea to learn all the tricks


Posted by William Allen on April 19th, 2005


"William Allen" wrote in message
Temporary link to first draft now retired. Current version 4Dos Guide from:
Install 4Dos in a Custom window http://www.allenware.com/find?4DosGuide

--
William Allen
Free interactive Batch Course http://www.allenware.com/icsw/icswidx.htm
Batch Reference with examples http://www.allenware.com/icsw/icswref.htm
Header email is rarely checked. Contact us at http://www.allenware.com/




Similar Posts