Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Compiling BAT to EXE failiure  (Read 7291 times)

0 Members and 1 Guest are viewing this topic.

zeroburn

    Topic Starter


    Hopeful

  • Knowlege will take you further than any guide
  • Thanked: 2
    • Yes
    • Jared Kat Enterprises
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 7
Compiling BAT to EXE failiure
« on: March 21, 2012, 02:09:44 PM »
Hello all.
I have some batch files i am changing to the EXE applications, and i am using the "Bat to EXE converter" From the CH website. The compiler seems to work, but when i attempt to run one of the compiled scripts, the batch file does not run, and many processes named b2e.exe appear in my processes manager.

What am i doing wrong??

I select my batch file,  %somefile%.ico file, and compile without author information, and this happens.
I have tried re-installing, but it has failed.

(also, if someone knows where i can get a C++ compiler, free and without installing, as such i can run from flash drive, send me a link please.  thanks)
I consider myself a hacker. Not in the way of "I can break into your facebook" but in the way, I like to learn as much as I can, about anything i can. I don't just like having things fixed, I like to understand why it was broken and why a particular solution fixed it. It is just how I am, and how I will always be. As teachers have said before, you cant learn if you don't figure it out in your own mind.

Salmon Trout

  • Guest
Re: Compiling BAT to EXE failiure
« Reply #1 on: March 21, 2012, 03:14:34 PM »
1. Well, that "converter" is said to work with Windows 95 and above, so it must be an MS-DOS batch converter, and probably does not recognise Windows NT cmd language. Many people do not appreciate that the modern Windows command environment is NOT MS-DOS.

2. http://www.softpedia.com/get/PORTABLE-SOFTWARE/Programming/Windows-Portable-Applications-Dev-C-Portable.shtml




zeroburn

    Topic Starter


    Hopeful

  • Knowlege will take you further than any guide
  • Thanked: 2
    • Yes
    • Jared Kat Enterprises
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 7
Re: Compiling BAT to EXE failiure
« Reply #2 on: March 21, 2012, 05:45:59 PM »
So then, What is it that i need to do in order to get these EXE files to work?? they are in basic BAT file language, and work as a BAT, but not EXE.
I am curious about what i need to do.

EDIT:
Also, the converter worked before on a batch, but it stopped working for some reason...
I consider myself a hacker. Not in the way of "I can break into your facebook" but in the way, I like to learn as much as I can, about anything i can. I don't just like having things fixed, I like to understand why it was broken and why a particular solution fixed it. It is just how I am, and how I will always be. As teachers have said before, you cant learn if you don't figure it out in your own mind.

Squashman



    Specialist
  • Thanked: 134
  • Experience: Experienced
  • OS: Other
Re: Compiling BAT to EXE failiure
« Reply #3 on: March 21, 2012, 06:21:46 PM »
Would really need to see all your code and how your are packaging up the files. Many of these bat to exe converters do not always play nice with the batch files.
I have used this one in the past with success. You could give it a try.
 http://www.f2ko.de/programs.php?lang=en&pid=b2e

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: Compiling BAT to EXE failiure
« Reply #4 on: March 21, 2012, 06:35:35 PM »
So then, What is it that i need to do in order to get these EXE files to work?? they are in basic BAT file language, and work as a BAT, but not EXE.
I am curious about what need to do.
The short and most precise answer is that you cannot compile batch files. Converting a batch file to an executable is rather silly, because the only reason to do so is usually to "hide the code" but the way the exe converter's work, they typically just plonk the batch file at the end of a stub executable that writes the batch to a temporary folder and executes it. It gains you nothing but additional headaches.


I was trying to dereference Null Pointers before it was cool.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Compiling BAT to EXE failiure
« Reply #5 on: March 21, 2012, 07:03:30 PM »
If the OP would provide a sample of the kind of batch he does, others could check out the compatibility issues.

zeroburn

    Topic Starter


    Hopeful

  • Knowlege will take you further than any guide
  • Thanked: 2
    • Yes
    • Jared Kat Enterprises
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 7
Re: Compiling BAT to EXE failiure
« Reply #6 on: March 21, 2012, 09:09:54 PM »
The codes are very simple. Such as
@ echo off
open notepad.exe
exit

Ext.
I consider myself a hacker. Not in the way of "I can break into your facebook" but in the way, I like to learn as much as I can, about anything i can. I don't just like having things fixed, I like to understand why it was broken and why a particular solution fixed it. It is just how I am, and how I will always be. As teachers have said before, you cant learn if you don't figure it out in your own mind.

Salmon Trout

  • Guest
Re: Compiling BAT to EXE failiure
« Reply #7 on: March 22, 2012, 12:52:36 AM »
The codes are very simple. Such as
@ echo off
open notepad.exe
exit

Ext.

So why bother "compiling" them?


Squashman



    Specialist
  • Thanked: 134
  • Experience: Experienced
  • OS: Other
Re: Compiling BAT to EXE failiure
« Reply #8 on: March 22, 2012, 07:03:13 AM »
The codes are very simple. Such as
@ echo off
open notepad.exe
exit

Ext.
Please use code tags around your code.
Code: [Select]
H:\>open /?
'open' is not recognized as an internal or external command,
operable program or batch file.
You should be using the START command or just putting NOTEPAD.exe in your batch file by itself.

TheShadow



    Hopeful

  • Retiree in Florida
  • Thanked: 13
    • Yes
    • The Doctor
  • Certifications: List
  • Computer: Specs
  • Experience: Guru
  • OS: Windows XP
Re: Compiling BAT to EXE failiure
« Reply #9 on: March 22, 2012, 07:32:55 AM »
I have used such a compiler to make an .exe file out of a batch file, but it's OLD.
Old means that it was written before many of the batch commands were changed and new ones added.

That little batch file quoted above is pretty simple, but "Open" is the wrong word.  If more commands are to follow that line, then the proper word would be "Start".
exit is not required at all as the batch file is done and will close when the last command is run.

To run or "open" notepad, just put a shortcut to it on your desktop or in your Quick Launch Toolbar.  Much quicker and easier.

When I have compiled a batch file, in the distant past, I've made it as simple as possible, with NO Rem statements, line spaces or extraneous commands.  Just the basics!

Cheers Mate!
 8)
Experience is truly the best teacher.
Backup! Backup! Backup!  Ghost Rocks!

Salmon Trout

  • Guest
Re: Compiling BAT to EXE failiure
« Reply #10 on: March 22, 2012, 09:11:34 AM »
Please use code tags around your code.

Not necessary in this case. It's just an option. I prefer monospace (the little typewriter) myself.