Any other bat to exe converters/wrappers?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
uglyninja
Posts: 7
Joined: 18 May 2018 14:22

Any other bat to exe converters/wrappers?

#1 Post by uglyninja » 18 May 2018 14:32

My question is, are there any other bat to exe converter/wrappers out here?
I only know of http://www.battoexeconverter.com/.

You may ask, "Why do you need other bat to exe converters when you already have one?".
So, i have seen that files converted with this program turn on quite a bit longer than normal .bat files, which is not suitable for making functions/plugins.
Is there a way to make it open just as fast as normal .bat files?

Thanks for any help.


- uglyninja

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Any other bat to exe converters/wrappers?

#2 Post by aGerman » 18 May 2018 17:10

viewtopic.php?p=36858#p36858
No idea why people think they need to wrap Batch scripts into self-extractors.

Steffen

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: Any other bat to exe converters/wrappers?

#3 Post by Ed Dyreen » 19 May 2018 07:14

aGerman wrote:
18 May 2018 17:10
viewtopic.php?p=36858#p36858
No idea why people think they need to wrap Batch scripts into self-extractors.

Steffen
better performance

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Any other bat to exe converters/wrappers?

#4 Post by aGerman » 19 May 2018 08:11

Ed Dyreen wrote:
19 May 2018 07:14
better performance
The reason for uglyninja's question was that he observed bad performance. It's unlikely that it performs better with an additional process for the unpacking of the script than running cmd.exe directly. The latter has to be run anyway.

Steffen

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: Any other bat to exe converters/wrappers?

#5 Post by Ed Dyreen » 19 May 2018 08:40

aGerman wrote:
19 May 2018 08:11
Ed Dyreen wrote:
19 May 2018 07:14
better performance
The reason for uglyninja's question was that he observed bad performance. It's unlikely that it performs better with an additional process for the unpacking of the script than running cmd.exe directly. The latter has to be run anyway.

Steffen
Quick Batch File Compiler v3.6.0.0 gives me a noticeable performance benefit after the script has been unpacked. [25-50]% is not unusual.

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Any other bat to exe converters/wrappers?

#6 Post by penpen » 19 May 2018 14:56

Ed Dyreen wrote:
19 May 2018 08:40
Quick Batch File Compiler v3.6.0.0 gives me a noticeable performance benefit after the script has been unpacked. [25-50]% is not unusual.
I might miss something, but isn't that the same statement as aGermans:
The (unpacked) batch file is (25-50%) faster than the executable (which probably is caused by unpacking the batch file).

Beside this i downloaded and tested "Quick Batch File Compiler v3.6.0.0" (because i wasn't sure if i misunderstood something):
In my tests the original batch file always is (noticably) faster than the compiled one (i used recursive calls to the executable to compute the n-th fibonacci number; but i'm unsure how big the influence of the disclaimer was - i created an exe that spammed the cmd window with returns).

When viewing the resulting exe file within a hex editor, it's obvious that it's just the standard zip self extracting archieve, as all the so called "compilers" i saw in the past.
If one of them would be really a "compiler" (in the sense of that word) it would probably be much faster than the original batch;
but i've never seen one (probably because the resulting exe wouldn't be 100% batch compatible),
which anwers the question of the op "Is there a way to make it open just as fast as normal .bat files?":
No.

You probably (untested, but i'm pretty sure) could mimic/copy the main functionality (executing batch code from packed state) of such bat2exe compilers by using "makecab.exe" and "extrac32.exe", so i even don't see why someone would want to give money away for such tools (only to get an icon and some file informations added, which i suspect also to be possible by using windows onboard tools only).

penpen

npocmaka_
Posts: 516
Joined: 24 Jun 2013 17:10
Location: Bulgaria
Contact:

Re: Any other bat to exe converters/wrappers?

#7 Post by npocmaka_ » 19 May 2018 19:35

https://stackoverflow.com/questions/281 ... arty-tools

But there's now way to have the same performance as a pure bat file.

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: Any other bat to exe converters/wrappers?

#8 Post by Ed Dyreen » 20 May 2018 19:34

penpen wrote:
19 May 2018 14:56
I might miss something, but isn't that the same statement as aGermans:
The (unpacked) batch file is (25-50%) faster than the executable (which probably is caused by unpacking the batch file).

Beside this i downloaded and tested "Quick Batch File Compiler v3.6.0.0" (because i wasn't sure if i misunderstood something):
In my tests the original batch file always is (noticably) faster than the compiled one (i used recursive calls to the executable to compute the n-th fibonacci number; but i'm unsure how big the influence of the disclaimer was - i created an exe that spammed the cmd window with returns).
You are correct, I remembered it badly that it would run much faster. I tested a compiled batch versus an uncompiled and it seemed that the compiled version was a little faster but then I timed it and found no noticeable difference.

Then the only reason I used QBFC was because it allowed me to turn a batch file into an executable which allowed me to rename it to .SCR which allowed me to set it as a screensaver.
Attachments
TheMatrix.7z
(29.59 KiB) Downloaded 475 times

misol101
Posts: 475
Joined: 02 May 2016 18:20

Re: Any other bat to exe converters/wrappers?

#9 Post by misol101 » 21 May 2018 02:57

Ed Dyreen wrote:
20 May 2018 19:34
Then the only reason I used QBFC was because it allowed me to turn a batch file into an executable which allowed me to rename it to .SCR which allowed me to set it as a screensaver.
Nice idea, finally an actual use for those things.

Also, to respond to OP, what is this obsession with file size? Where does it come from and what does it matter? You need to look into 4k intro competitions and start coding assembler instead if size optimisation is your thing :)

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Any other bat to exe converters/wrappers?

#10 Post by penpen » 21 May 2018 19:31

Indeed a nice usecase. :D

But when i tried to download it, my "Windows Defender" automatically deletes the file to cure "Trojan:Win32/Fuery.A!cl".
Because it is from you i think this probably is a false positive, but i unfortunately can't convince my "Defender" from my point of view (and because here it's 3:30am i will probably try again later).

penpen

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: Any other bat to exe converters/wrappers?

#11 Post by Ed Dyreen » 22 May 2018 11:04

penpen wrote:
21 May 2018 19:31
Indeed a nice usecase. :D

But when i tried to download it, my "Windows Defender" automatically deletes the file to cure "Trojan:Win32/Fuery.A!cl".
Because it is from you i think this probably is a false positive, but i unfortunately can't convince my "Defender" from my point of view (and because here it's 3:30am i will probably try again later).

penpen
I only have a virus scanner running on my pfsense firewall not on any local systems so I can't really scan unless I download anti virus software. I find it very odd that a compiled file would trigger an anti virus, this highly suggest it may be infected also because the version of QBFC I use is pirated. However, I have not noticed any negative effects on systems using the software. Although pfsense logs do not seem to provide such evidence, I shall install an outbound firewall to test for abnormal outbound traffic.

I suggest to always be careful, to not trust anyone regardless what their reputation might be and not just blindly run software on critical systems. I have no assembly knowledge so I can only do that much.

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Any other bat to exe converters/wrappers?

#12 Post by penpen » 22 May 2018 14:55

I agree, one has to be carefully handling possible viruses, but also i think one also shouldn't overreact:
I always scan files before executing them, but i don't like that the windows defender doesn't let me make a copy of that file... .
Especially when i never wanted to execute that exe, but wanted to view the batch file:
Nice work by the way i like it.

I had to setup another pc to get this 7z-file, and i still think this is a false positive (i renamed the scr to exe):
https://www.virustotal.com/de/file/9b4c ... 527021735/.


penpen

Post Reply