MSFN Forum: CMD or BAT to EXE compiler what is the best - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

CMD or BAT to EXE compiler what is the best Rate Topic: -----

#1 User is offline   Astalavista 

  • MSFN loyalist
  • PipPipPipPipPipPipPipPipPip
  • Group: Banned
  • Posts: 3,338
  • Joined: 02-December 03

Posted 16 December 2004 - 08:16 PM

what is the best CMD or BAT to EXE compiler.

with a nice gui? :P


#2 User is offline   gabriel_buc 

  • G@bR!e|_
  • PipPip
  • Group: Members
  • Posts: 200
  • Joined: 05-August 04

Posted 19 December 2004 - 03:22 PM

As far as I know CMD and BAT files cannot be compiled into EXEs !

BAT files contain a number of DOS commmands that are executed when the file runs.
CMD files are something similar.

I don't know exactly the difference between the two of them.

#3 User is offline   prathapml 

  • Follow the rules please :-)
  • Group: Patrons
  • Posts: 6,791
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 19 December 2004 - 04:57 PM

This really is the fourth such thread in the last two weeks. Forgot to search, eh? :P

Anyways, you have bat2com, (free) and QuickBatchFileCompiler (paid).

#4 User is offline   Astalavista 

  • MSFN loyalist
  • PipPipPipPipPipPipPipPipPip
  • Group: Banned
  • Posts: 3,338
  • Joined: 02-December 03

Posted 19 December 2004 - 06:34 PM

omg i broke the cardinal rule of not searching.

hi gabriel, yes u can... it is called compiling. :P

prathapml

if i compile cmd or bat to EXE w/ like quickbatchfilecompiler

will it still show the cmd window?

thanks!

#5 User is offline   prathapml 

  • Follow the rules please :-)
  • Group: Patrons
  • Posts: 6,791
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 19 December 2004 - 08:18 PM

Astalavista, on Dec 20 2004, 06:04 AM, said:

will it still show the cmd window?
If compiled with the freeware tool I have, no CMD window is shown. I don't know for sure about QBFC - I heard of it only recently, I haven't tested with it (but since its commercial, gotta be for a good reason :P ).

#6 User is offline   dazkrlauwste 

  • Member
  • PipPip
  • Group: Members
  • Posts: 127
  • Joined: 27-April 04

Posted 16 February 2005 - 07:14 AM

Is there a way to revert an exe that has been made by QBFC to it's origrinal form, BAT or CMD?

#7 User is offline   lilweirddude 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 573
  • Joined: 24-August 04

Posted 16 February 2005 - 03:13 PM

Astalavista, on Dec 19 2004, 06:34 PM, said:

omg i broke the cardinal rule of not searching.

hi gabriel, yes u can... it is called compiling. :P

prathapml

if i compile cmd or bat to EXE w/ like quickbatchfilecompiler

will it still show the cmd window?

thanks!
<{POST_SNAPBACK}>

i think you can do it so no window is shown through an option called ghosting
im not sure which application it is though

#8 User is offline   syskplim 

  • Newbie
  • Group: Members
  • Posts: 33
  • Joined: 23-January 05

Posted 16 February 2005 - 11:24 PM

i am using BAT2EXE to compile my BAT files and the output is .com but NOT .exe and i think there is no decompiler that can convert .com back to .bat.

actually, if you sure that a com file was compiled from .bat, you can read that .com file by using a hex editor. i still can read what i've writen in a batch after i compiled it to com but a lot of bin code will be added into .com.

After you compiled your batch into .com, that .com file will be same as other .com files which maybe compiled from Assembly or other programming. There is a tool can decompile .com back to .ASM files but not batch.

Read this......

#9 User is offline   ZileXa 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 767
  • Joined: 27-May 04

Posted 27 June 2006 - 11:39 AM

View Postprathapml, on Dec 20 2004, 04:18 AM, said:

Astalavista, on Dec 20 2004, 06:04 AM, said:

will it still show the cmd window?
If compiled with the freeware tool I have, no CMD window is shown. I don't know for sure about QBFC - I heard of it only recently, I haven't tested with it (but since its commercial, gotta be for a good reason :P ).


Sorry for kicking such an OLD topic, I searched a lot but haven't found what I was looking for:

I tried bat2com, bat2exec (also creates a COM file), quickbatchfilecompiler (shareware) and ExeScript (shareware but better).
The first 2 both have the same thing: they DO show a black console window for a short time.
With Quick Batchfile Compiler you can create an EXE that will run hidden.. but then the end file is 146KB.. that's like 73 times bigger then neccessary since bat2exec creates a file little over 2KB.

ExeScript seems to to better: 8.50 KB AND allows the option to hide any window..

But I also know a file HIDE.EXE, it's only 1.60KB (!) and hides any batchfile that is run. My .cmd file is only 250 Bytes... So I was thinking to use the COPY /B option to merge those 2 together.. unfortunately that doesn't work, HIDE.EXE is started.. without any input.

I was wondering if anyone knows other options, perhaps a different compiler or method.
I added BAT2COM.com, BAT2EXEC.exe and HIDE.exe

This post has been edited by ZileXa: 27 June 2006 - 11:40 AM


#10 User is offline   Zxian 

  • Scroll up - see the Google bar?
  • Group: Super Moderator
  • Posts: 5,063
  • Joined: 30-September 04
  • OS:none specified
  • Country: Country Flag

Posted 27 June 2006 - 06:21 PM

I just tried these out, and of the lot, I like ExeScript the best. The default EXE is 16kb in size however, but you can UPX that down to 8KB.

I think that if you're not paranoid about the pop-up Window, then the freeware programs are the best. Otherwise, ExeScript seems to be the better of the payware versions.

#11 User is offline   jftuga 

  • Member
  • PipPip
  • Group: Members
  • Posts: 283
  • Joined: 27-October 05

Posted 27 June 2006 - 06:55 PM

Just as another option, especially if your batch file is not too long, you could always convert it into an AutoIt script, which can be compiled into a EXE file.

http://www.autoitscript.com/autoit3/

-John

#12 User is offline   LLXX 

  • MSFN Junkie
  • PipPipPipPipPipPipPipPipPip
  • Group: Banned
  • Posts: 3,399
  • Joined: 04-December 05

Posted 28 June 2006 - 04:46 AM

View Postjftuga, on Jun 27 2006, 07:55 PM, said:

Just as another option, especially if your batch file is not too long, you could always convert it into an AutoIt script, which can be compiled into a EXE file.

http://www.autoitscript.com/autoit3/

-John
AutoIt is best for more extensive tasks, as the overhead it adds is absolutely astronomical.

Quote

i am using BAT2EXE to compile my BAT files and the output is .com but NOT .exe and i think there is no decompiler that can convert .com back to .bat.
I don't know the specifics of BAT2EXE, but most of the batch file "compilers" that exist simply add a (should be) small stub of code that just executes the commands in your batch file, which is appended to the stub, via spawning a shell. There is likely no BAT interpreter present (though 8Kb of code is more than enough to implement one).

#13 User is offline   ZileXa 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 767
  • Joined: 27-May 04

Posted 28 June 2006 - 06:11 AM

I just created a collection that allows you to:

- Create an EXE file from your batchfiles
- include ICON for the file
- include other necessary files (DLL or stuff)

The nice thing is: The output is smaller then QuickBatchfile.. perhaps it's even faster
(I compress with 7z using FAST (since batchfile is only text, Ultra compression makes little difference) and after adding icon I UPX, checkout the HOWTO.txt

BATCH2EXE
http://www.savefile.....php?pid=423945

This post has been edited by ZileXa: 28 June 2006 - 09:20 AM


#14 User is offline   Zxian 

  • Scroll up - see the Google bar?
  • Group: Super Moderator
  • Posts: 5,063
  • Joined: 30-September 04
  • OS:none specified
  • Country: Country Flag

Posted 28 June 2006 - 08:57 AM

I can't seem to get through on that site. Did you want to possibly e-mail me the files, and then I can put them on a better mirror for you (and everyone else)?


EDIT - Nevermind... it came through... 45 seconds later. Here's a mirror. :)

#15 User is offline   ZileXa 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 767
  • Joined: 27-May 04

Posted 28 June 2006 - 12:40 PM

Savefile is having problems with server07, think will be solved in a month.

#16 User is offline   midiboy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 586
  • Joined: 04-July 04

Posted 28 August 2008 - 11:46 AM

Hi guys,

sorry to use that old thread. :-)
Looking for a cmd to exe compiler that creates 64bit executables. QuickBFC doesnīt seem to do that.

Any other ideas ?

Thanks,
Alex

#17 User is offline   Zxian 

  • Scroll up - see the Google bar?
  • Group: Super Moderator
  • Posts: 5,063
  • Joined: 30-September 04
  • OS:none specified
  • Country: Country Flag

Posted 02 September 2008 - 01:15 AM

Why do you need a 64-bit executable from a batch file? 32-bit apps will run perfectly fine in most scenarios on 64-bit OSes.

#18 User is offline   DigeratiPrime 

  • MSFN Junkie
  • Group: Super Moderator
  • Posts: 3,490
  • Joined: 18-August 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 02 September 2008 - 05:50 AM

I am curious too, my thinking was the 64bit cmd.exe environment variables map to different locations in some cases. Otherwise I think all these wrappers do is pass the script onto the cmd interpreter anyway. So is there a difference between a cmd file packed in a silent SFX created by WinRAR or one of these specialist applications?

#19 User is offline   midiboy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 586
  • Joined: 04-July 04

Posted 02 September 2008 - 06:40 AM

Hi guys,

I tell you why a 64bit compiler would be necessary. I am starting WPI from a batch file that checks for the existence of a network share and maps that share if it exists. Since it includes credentials I donīt want the script to be easily readable hence the conversion to an exe.

Now, the new WPI version 7.1 allows for 64bit processing, meaning, you can control if the 64bit cmd.exe/regedit.exe is being used on a 64bit system or the 32bit cmd.exe/regedit.exe. However, you need WPI to run with the 64bit mshta.exe in order for this to work.

You need this to silently add the serial numbers or configs etc. for an application via a "regedit /S reg.reg" command. If the application is 64bit it needs its registry settings in another place in the registry than a 32bit application on a 64bit system.

Now, the problem is: If WPI or any other application is started from a 32bit application, it will never be able to use the 64bit cmd.exe/regedit/mshta.exe. Even if you specify the correct path to the 64bit application, redirection will occur and the 32bit version of the program will be started.

It took me days to find out why WPI was always started with the 32bit mshta.exe. I finally figured that the reason for this was the 32bit compiled exe.

So on a 64bit system, in order to avoid folder redirection or registry redirection with your compiled scripts , you need a 64bit exe.

Bye,
Alex

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy