82Views27Replies

Author Options:

com files Answered

I know how to convert batch(.bat) files to executable(.exe) file and to .com files but how do I convert first .com files into batch(.bat) files? and if its possible executable(.exe) files into batch(.bat) files? Thanks in advance

Discussions

0
lemonie
lemonie

12 years ago

BAT is a contraction of Batch. A BAT file is a batch of commands, it's not an executable as such. You could get an executable to issue the same commands, but why? I can't see the logic in trying to covert .exe. into .bat, because the .bat would almost certainly have to call other .exe's - again, why? L

0
J.W
J.W

Reply 12 years ago

I have reasons

0
NachoMahma
NachoMahma

Reply 12 years ago

. If you would at least give us a hint, someone might know how to accomplish what you are trying to do. Everyone that has bothered to answer has said they think BAT conversion won't work. If someone knows how to do it, they ain't talkin'. Without giving us some idea of what you're trying to do, it's impossible to help.

0
J.W
J.W

Reply 12 years ago

I wanna see what commands there is in the .exe/.com files so that I can get better at programming. For example: In a batch file you can only run the commands at the commandline in a dos-shell, but I wanna make a program that compiles in another shell, not at the dos-prompt. And stuff like that.

0
zachninme
zachninme

Reply 12 years ago

Look at open-source programs, they'll have the source which you can peak at. You'll also need a compiler.

0
NachoMahma
NachoMahma

Reply 12 years ago

. Excellent suggestion! . A disassembler is not a very good learning tool - you have to know a bit about programming to use it effectively - but I'm guessing "so that I can get better at programming" is not a very accurate description of what he is trying to do. ;)

0
J.W
J.W

Reply 12 years ago

u think I lie? tyhat I just create viruses like everyone else here?

0
NachoMahma
NachoMahma

Reply 12 years ago

. I don't have enough info to call it a lie, but it doesn't _appear_ to 100% accurate, either. Just a gut feeling.
. _You_ are the one that brought up viruses.
. I haven't seen any info on writing viruses on this site (although it could very well be there, I didn't look that hard). To say everyone is writing viruses is, well, preposterous.
. If you are trying to write a virus, I don't think many ppl would mind helping you out. Judging by your posts, your chances of success are pretty close to nil. ;)

0
J.W
J.W

Reply 12 years ago

Yeah, but it've been like that like all the hundreds of times I've tryed to find something out but I've succeed eveery time cept one so far so.

0
NachoMahma
NachoMahma

Reply 12 years ago

. BTW, my last sentence of my prev post was not meant to imply that you are dumb or anything, just that modern systems are pretty hard to hack/crack. Doing it on an Apple //e was trivial compared to today. Apple sold the source code to their OS for a few bucks (and it wasn't but 30-40 pages); even if you could get the source code for Windows (probably 10's of feet of shelf space), it would take an experienced programmer to understand it. Find some of the source code for Linux and you'll see what I mean.

0
chooseausername
chooseausername

Reply 12 years ago

People who code and spread viruses are the bio-terrorists equivalents of the internet. Do you like terrorism J.W. ?

0
J.W
J.W

Reply 12 years ago

no

0
chooseausername
chooseausername

Reply 12 years ago

Maybe you could learn about AI instead ?

Developing AI is a very interesting challenge too.
You could develop AI for video games or industrial robots or toy-bots. =o)

0
J.W
J.W

Reply 12 years ago

Sure I'll check it out

0
zachninme
zachninme

Reply 12 years ago

Well, that's really the only way .com files are ever used anymore...

0
zachninme
zachninme

Reply 12 years ago

Not to mention there's no comments, and sometimes the variables are labeled unhelpfully. (Not always, though)

0
lemonie
lemonie

Reply 12 years ago

An EXE contains machine code which is processed by the CPU. If you can get anything out of that link, this may be as much as help as you are likely to get on the subject of finding out what commands there are in an EXE.

L

0
chooseausername
chooseausername

Reply 12 years ago

Actually, we simply have just to look at your previous comments to find out what is your real motivation.

0
J.W
J.W

12 years ago

And where can I download this "disassembler"???

0
NachoMahma
NachoMahma

Reply 12 years ago

. The link I gave earlier should put you on the right track.

0
NachoMahma
NachoMahma

12 years ago

. Many moons ago (pre-Windows) I used a program that would convert BAT files to, IIRC, COM files. When the generated code was disassembled, it was just calls to the same exact routines as the batch file. All that was accomplished was bypassing the command interpreter (which is not usually the bottleneck for a BAT file). . BAT files were never meant to do but rudimentary math, so converting all but the simplest EXEs wouldn't work. Forget any "real" program. And a BAT can't do anything that can't be done from the command line. . COM files are usually pretty simple. You _might_ have some luck with them, but I doubt it.

0
Goodhart
Goodhart

Reply 12 years ago

Back in those days, out of one of the computer mags, there was a "super" batch file program that was a bit more enhanced: I think it was called BatchMan (or BatMan for short). Ever hear of it ? Back in the haydays of Norton Commander. :-)

0
NachoMahma
NachoMahma

Reply 12 years ago

. Used NC a lot, but don't remember BatMan.

0
Goodhart
Goodhart

Reply 12 years ago

Oh, it was from one of the PC magazines at about that time. It was like an advanced Batch file creator (I remember opening it for the first time and hearing the Batman theme *lol* ).

Essentially, it added a few extra useful commands similar to BASIC (goto, return, etc). Its been a long time since I have seen it, so my memory may be a little fuzzy :-)

0
Goodhart
Goodhart

12 years ago

I don't want this to sound smart alecky or anything, but attempting this is like reducing Calculus into addition and subtraction notation only. It is never easy to go from "complex" to simple. Again, like viewing a file created with WORD2003 in the first WORD program to ever come out. Loss of most functionality would occur.

0
chooseausername
chooseausername

12 years ago

Maybe it is possible to convert back to .BAT an .EXE or .COM that you previously converted from a .BAT file. (BAT -> EXE -> BAT) But it's not possible to convert a general .EXE or .COM program into a batch file. .EXE files (and the old .COM) are compiled (binary) programs. Their source code may be in a programming language like C, C++, Pascal, Delphi or Assembly ... anything but a BATch file who is more like a script. Programming languages are really more advanced than BATch file scripts. It is thus impossible to convert a .EXE compiled from an advanced programming language source code into a BATch file script.