Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to edit a .exe or a .com file

1,992 views
Skip to first unread message

news.hccnet.nl

unread,
Oct 19, 1999, 3:00:00 AM10/19/99
to
I want to edit a .com and a .exe file (the text with in it) but if I do it
with wordpad or MSedit (DOS) I olways get a error
how to solve this???
do you need a special program for editting these files???
please send me an e-mail: t.b...@hccnet.nl

Thanks
Tom

Charles Dye

unread,
Oct 19, 1999, 3:00:00 AM10/19/99
to
On Tue, 19 Oct 1999 11:44:00 +0200, "news.hccnet.nl"
<t.b...@hccnet.nl> wrote:

>I want to edit a .com and a .exe file (the text with in it) but if I do it
>with wordpad or MSedit (DOS) I olways get a error
>how to solve this???
>do you need a special program for editting these files???

Actually, it is possible to use the MS-DOS editor (the version
which ships with Windows 95/98) to patch binary files. Put a
slash followed by a number before the filename on the command
line:

EDIT /77 MYPROG.COM

Edit will open MYPROG.COM in binary mode, with 77 columns
per line. Keep Edit in *overstrike* mode, and don't delete or
insert any characters. Make a backup before trying this!

Of course, a real hex editor like Norton DiskEdit would be a
better choice for this kind of activity.

ras...@highfiber.com


Chee Meng

unread,
Oct 19, 1999, 3:00:00 AM10/19/99
to
You need a hex editor (something like Norton Disk Editor or maybe Hex
Workshop).

DONALD G. DAVIS

unread,
Oct 19, 1999, 3:00:00 AM10/19/99
to
"news.hccnet.nl" <t.b...@hccnet.nl> writes:

>I want to edit a .com and a .exe file (the text with in it) but if I do it
>with wordpad or MSedit (DOS) I olways get a error
>how to solve this???
>do you need a special program for editting these files???

You need a hex editor such as PCTools or Norton Diskedit, that
will change only the bytes you explicitly specify. If you don't want to
buy a commercial one, you may be able to find a free one by searching for
"hex editor" on WWW or ftp sites.
--Donald Davis

Matthew Haley

unread,
Oct 19, 1999, 3:00:00 AM10/19/99
to
You need a binary file editor.

"news.hccnet.nl" wrote:

> I want to edit a .com and a .exe file (the text with in it) but if I do it
> with wordpad or MSedit (DOS) I olways get a error
> how to solve this???
> do you need a special program for editting these files???

Outsider (6.22/3.11)

unread,
Oct 19, 1999, 3:00:00 AM10/19/99
to
Charles Dye wrote:
>
> On Tue, 19 Oct 1999 11:44:00 +0200, "news.hccnet.nl"
> <t.b...@hccnet.nl> wrote:
>
> >I want to edit a .com and a .exe file (the text with in it) but if I do it
> >with wordpad or MSedit (DOS) I olways get a error
> >how to solve this???
> >do you need a special program for editting these files???
>
> Actually, it is possible to use the MS-DOS editor (the version
> which ships with Windows 95/98) to patch binary files. Put a
> slash followed by a number before the filename on the command
> line:
>
> EDIT /77 MYPROG.COM
>
> Edit will open MYPROG.COM in binary mode, with 77 columns
> per line. Keep Edit in *overstrike* mode, and don't delete or
> insert any characters. Make a backup before trying this!
>
> Of course, a real hex editor like Norton DiskEdit would be a
> better choice for this kind of activity.
>
> ras...@highfiber.com

No Can Do.

C:\DOS>edit /77 \com\send.com
Starts the MS-DOS Editor, which creates and changes ASCII files.

EDIT [[drive:][path]filename] [/B] [/G] [/H] [/NOHI]

[drive:][path]filename Specifies the ASCII file to edit.
/B Allows use of a monochrome monitor with a color graphics
card.
/G Provides the fastest update of a CGA screen.
/H Displays the maximum number of lines possible for your
hardware.
/NOHI Allows the use of a monitor without high-intensity support.

Doesn't work.

Regards,
Outsider

Charles Dye

unread,
Oct 19, 1999, 3:00:00 AM10/19/99
to
On Tue, 19 Oct 1999 20:34:47 +0200, "Outsider (6.22/3.11)"
<nospa...@aol.com> wrote:

>Charles Dye wrote:
>>
>> EDIT /77 MYPROG.COM
>
>No Can Do.
>
>Doesn't work.

Only in the newer EDIT.COM, the one from Win95 and later. The
older, QBASIC-based EDIT does not support this feature.

ras...@highfiber.com


Rez

unread,
Oct 19, 1999, 3:00:00 AM10/19/99
to
DONALD G. DAVIS wrote:

>
> "news.hccnet.nl" <t.b...@hccnet.nl> writes:
>
> >I want to edit a .com and a .exe file (the text with in it)
> You need a hex editor such as PCTools or Norton Diskedit, that
>will change only the bytes you explicitly specify. If you don't want to
>buy a commercial one, you may be able to find a free one by searching for
>"hex editor" on WWW or ftp sites.

I use teeny tiny FM.COM (9k) (CalTech's File Modify) which is freeware.
Despite being from 1985 it still does the job. I can post the thing if
folks want it. It works okay when run on FAT32 drives, also.

~REZ~


Maarten Egmond

unread,
Oct 20, 1999, 3:00:00 AM10/20/99
to
Rez <rividh.min...@earthlink.net> wrote:

>> >I want to edit a .com and a .exe file (the text with in it)

> I use teeny tiny FM.COM (9k) (CalTech's File Modify) which is freeware.


> Despite being from 1985 it still does the job. I can post the thing if
> folks want it. It works okay when run on FAT32 drives, also.

A good one is zapit, which I wrote. Don't worry, it's completely free :-)
Check it out from http://www.stack.nl/~ep/product.html
It's about 60kB, and it has some nice features beyond simple editing too.
(Search and replace, edit disks directly (FAT12/16), etc.)

I think however, that the original poster shouldn't try modifying the file,
since someone who doesn't know about binary files (tries to edit a .com or
.exe with DOS's EDIT) probably doesn't know what s/he is doin, and may damage
the file in question considerably... Be careful!
--
Regards, Maarten 'Elmer' Egmond.
----------Be a friend to the Earth, and it will be a friend to you----------
www: http://www.stack.nl/~ep email: e...@stack.nl

Rez

unread,
Oct 20, 1999, 3:00:00 AM10/20/99
to
Maarten Egmond wrote:
> A good one is zapit, which I wrote. Don't worry, it's completely free

Free is good :)

> Check it out from http://www.stack.nl/~ep/product.html
>It's about 60kB, and it has some nice features beyond simple editing too.
> (Search and replace, edit disks directly (FAT12/16), etc.)

Fetching it as we speak. Come to think of it we may have an old version
on the BBS, the name sounds familiar.

Also pilfered the tagline util while I was there -- it should work on
any text file of more or less typical tagline format, yes?



>I think however, that the original poster shouldn't try modifying the file,
> since someone who doesn't know about binary files (tries to edit a .com or
> .exe with DOS's EDIT) probably doesn't know what s/he is doin, and may damage
> the file in question considerably... Be careful!

Yep. At the very least have backups, but best to have some clue what
you're editing too. Text strings are not normally a problem but other
stuff can be. I have killed unwanted functions in a .COM file by
overwriting the bytes that called some other exectutables I was tired of
being bothered by, but I had a good idea what belonged to what.

What I'd really like is a hex editor that lets me INSERT bytes without
munging up the rest of an executable or data file. I know this won't
work on those that rely on offsets to find their body parts, but many a
time I've wanted to insert specific bytes in a data file and didn't have
any simple tool to do it with.

~REZ~


Al Aab

unread,
Oct 21, 1999, 3:00:00 AM10/21/99
to
........
^fm##
........


------------------------------

http://oak.oakland.edu/simtel.net/


binaryed/
FM 8098 860617 edit binary files at byte level in ascii/hex


------------------------------

ftp://garbo.uwasa.fi/pc/


programming/
FM file modify (at byte level)
---
n.b.
TO DOWNLOAD A FILE
CONVERT ITS NAME TO lowercase


........
zapit
........


------------------------------

http://oak.oakland.edu/simtel.net/


binaryed/
ZAPIT510 69675 971012 zap-it v5.10: hex file/disk editor


------------------------------

ftp://garbo.uwasa.fi/pc/


binedit/
ZAPIT510 zap-it hex file/disk editor, restless, elmer productions
---
n.b.
TO DOWNLOAD A FILE
CONVERT ITS NAME TO lowercase

i like zapit

--
=-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
al aab, ex seders moderator sed u soon
it is not zat we do not see the s o l u t i o n
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+

Outsider (6.22/3.11)

unread,
Oct 21, 1999, 3:00:00 AM10/21/99
to
Rez wrote:
>
> DONALD G. DAVIS wrote:
> >
> > "news.hccnet.nl" <t.b...@hccnet.nl> writes:
> >
> > >I want to edit a .com and a .exe file (the text with in it)
> > You need a hex editor such as PCTools or Norton Diskedit, that
> >will change only the bytes you explicitly specify. If you don't want to
> >buy a commercial one, you may be able to find a free one by searching for
> >"hex editor" on WWW or ftp sites.
>
> I use teeny tiny FM.COM (9k) (CalTech's File Modify) which is freeware.
> Despite being from 1985 it still does the job. I can post the thing if
> folks want it. It works okay when run on FAT32 drives, also.
>
> ~REZ~

I don't think you ought to post a binary, but I would
like if you email me a copy :)

Regards,
Outsider

0 new messages