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

Author Topic: Error with bat2exe.com  (Read 7750 times)

0 Members and 1 Guest are viewing this topic.

hibyy

    Topic Starter


    Rookie

    • Experience: Familiar
    • OS: Windows 8
    Error with bat2exe.com
    « on: January 25, 2009, 06:23:03 AM »
    I need help I found out how to use the bat2exe.com It turns bats to .com files but only if there title is 4 letters long... But what I reall need help with is when my .bat is a .com it doesn't do what I told it to do as a .bat can someone help me?

    Dias de verano

    • Guest
    Re: Error with bat2exe.com
    « Reply #1 on: January 25, 2009, 06:29:32 AM »
    these programs are a bad idea. My advice is to not use them.

    Since you do not post details of your batch file, nobody will be able to help you.

    hibyy

      Topic Starter


      Rookie

      • Experience: Familiar
      • OS: Windows 8
      Re: Error with bat2exe.com
      « Reply #2 on: January 25, 2009, 06:39:42 AM »
      Well I was Trying to convert this code

      Code:
      @echo off
      :B
      Title Bat to Com Converter
      echo Please type in the name of the .bat file you wish to convert.
      set /p A=
      echo starting Converter...
      bat2exe %A%.bat
      echo.
      set /p E=To countinue presss ENTER.
      cls
      goto B

      And I downloaded this file from this site why is it a bad idea?

      Dias de verano

      • Guest
      Re: Error with bat2exe.com
      « Reply #3 on: January 25, 2009, 06:47:58 AM »
      That bat2exe.com program is for MS-DOS and your batch file contains set /p which is not used in MS-DOS.

      I think those programs are a bad idea because they don't work very well, and because batch files were never meant to be made into compiled programs.

      hibyy

        Topic Starter


        Rookie

        • Experience: Familiar
        • OS: Windows 8
        Re: Error with bat2exe.com
        « Reply #4 on: January 25, 2009, 06:49:42 AM »
        Oh Well thanks for the help! I'll see If I can try to learn .com programing so I won't have to use a converter!

        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: Error with bat2exe.com
        « Reply #5 on: January 25, 2009, 09:24:35 AM »
        Oh Well thanks for the help! I'll see If I can try to learn .com programing so I won't have to use a converter!

        COM programming will likely require assembly knowledge. (Although it might be possible in C) it's the same as a DOS executable, sans the header, and it can only be 64K.
        I was trying to dereference Null Pointers before it was cool.

        BatchFileCommand



          Hopeful
        • Thanked: 1
          Re: Error with bat2exe.com
          « Reply #6 on: January 25, 2009, 01:16:34 PM »
          Quote
          because batch files were never meant to be made into compiled programs.

          I beg to differ. I think that it would be very hard to share programs that people could very easily edit and call there own. Or here's my favorite batch converter. It converts it too .exe, but when you convert it you have the option of adding additional information and you can choose an icon file! 
          οτη άβγαλτος μεταφ βαθμολογία

          Dias de verano

          • Guest
          Re: Error with bat2exe.com
          « Reply #7 on: January 25, 2009, 01:22:29 PM »
          I beg to differ. I think that it would be very hard to share programs that people could very easily edit and call there own.

          It's not hard. I do it all the time!

          "Meant" means "intended". Microsoft did not intend that batch files should be compiled.

          BatchFileCommand



            Hopeful
          • Thanked: 1
            Re: Error with bat2exe.com
            « Reply #8 on: January 25, 2009, 02:14:22 PM »
            Then why did they put a built-in batch file converter in windows xp. It's called iexpress....
            οτη άβγαλτος μεταφ βαθμολογία

            fireballs



              Apprentice

            • Code:Terminal
            • Thanked: 3
              Re: Error with bat2exe.com
              « Reply #9 on: January 25, 2009, 02:17:58 PM »
              BFC you're not going to win this argument, basically because you're wrong. But kudos on trying to up your post count.

              FB
              Next time google it.

              Dias de verano

              • Guest
              Re: Error with bat2exe.com
              « Reply #10 on: January 25, 2009, 03:13:04 PM »
              BFC you're not going to win this argument, basically because you're wrong. But kudos on trying to up your post count.

              FB

              Regarding iexpress, he has got a point there, actually. It's more like a wrapper than a converter, but then so are the converters.

              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: Error with bat2exe.com
              « Reply #11 on: January 26, 2009, 09:22:27 AM »
              the only "real" way to "compile" a batch program would be to convert it into another language completely and compile the result.

              The best of these would be a conversion to assembly.

              The Iexpress program is included with Windows XP. Batch Programs have been around since DOS (version 2, I believe, not sure if Version 1 had them); as such one can only conclude that since a "wrapper" type program was not introduced officially by the "language vendor" until over 25 years after the original introduction that it was not intended, as Dias has already said, to be compiled.


              I find this IExpress tool humourous, simply because it uses the same Font for titles that the wizards in Office 4 use. LOL.
              I was trying to dereference Null Pointers before it was cool.

              nothlit



                Intermediate

                Thanked: 2
                Re: Error with bat2exe.com
                « Reply #12 on: January 26, 2009, 10:22:21 AM »
                here's my favorite batch converter. It converts it too .exe, but when you convert it you have the option of adding additional information and you can choose an icon file! 

                You might just have become my hero, I have wanted a batch to exe for awhile ... awesome

                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: Error with bat2exe.com
                « Reply #13 on: January 26, 2009, 10:31:52 AM »
                it's not a compiler. It's a wrapper, just like all the others.


                Warranted, it was a bit harder to find the batch code using process explorer- I had to find strings in memory rather then in the image, and it wasn't at the very end of the file.

                However- the very existence of the original batch code in the supposedly "compiled" executable means it wasn't actually "compiled" but rather... somehow, performs interpretation at run-time of the batch code.


                As such- compiling a batch file with tools such as this one, while very useful for distribution, is completely useless for either speed, or obfuscation.



                EDIT:

                never mind. It's actually less advanced then I originally suspected. analyzing the in memory strings with Process explorer, revealed an odd entity:

                "C:\Docume~1\mburgwin\LOCALS~1\Temp\81C.tmp\b2e.dll"


                curious as to this file, I navigated to this location and TYPEd it, thinking perhaps it was the batch file itself. No nice. However, looking at the other files in the directory, I discovered an interesting file- echo2.bat, which just so happened to be an exact duplicate of my originally compiled batch program! EGADS!
                I was trying to dereference Null Pointers before it was cool.

                BatchFileCommand



                  Hopeful
                • Thanked: 1
                  Re: Error with bat2exe.com
                  « Reply #14 on: January 26, 2009, 06:37:25 PM »
                  It's not a wrapper. It turned my batch file code to a bunch of funky symbols letters and stuff.  BC, have you ever used this program? I'm afraid it doesn't convert stuff over 35kb.
                  οτη άβγαλτος μεταφ βαθμολογία