Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to convert BAT file to EXE file? Need freeware program! 4

Status
Not open for further replies.

grofaty

IS-IT--Management
Jan 16, 2003
370
0
0
SI
Hi,

I would like to compile batch file to execution file (so BAT to EXE). On web I have found out a couple of programs, but all of them are demo or shareware. Is there any freeware or GPL license program.

Thanks,
Grofaty
 
rmgbelgium,

I don't like that I must select user and password. I would like to create a EXE file from BAT file and then distibute the file ower the network in my company. Users have different userids and passwords, so I think this program is useless to me.

Do you know for any other free program to just make a exe file without security settigs?

Thanks,
Grofaty
 
I would be grateful if the Forum adminstrator(s) could explain why my previously displayed post to the query by 'grofaty' has now disappeared... as has the subsequent post to me by 'RMBELGIUM'.

It would be nice to know what is going on...
 
Rick998,
converting my batch file with bat2exe.com it outputs the file.com. I renamed file to file.com and run it in command prompt it returns:
Code:
‰>!–»—€>– t»L—??–‹>? ¬<?uŠ< t?Câ?±° 8t°.?¬<?uŠ< t                 - 1250,
Bad command or file name
Bad command or file name
Bad command or file name

then it works wrong. So this converter is not working good. As I read in google forum this program is for ms-dos 5.0 and does not work for all commands in winXP.

Does anyone has tried out some program that converts bat to exe and that program works?
 
I looked for the same thing a few months back and never found a reliable solution. I finally purchased RapidBATCH for $25.00 ( and it does all I need and more.

Mel
 
grofaty,

Sorry but I had the same experience with bat2exe.

Apart from RunAsUser, I'm afraid that I don't know of an open source/freeware compiler.

Is the following any help?
Another way that I've used is have the last line in my BAT file delete the BAT file itself. I use something like WinRAR or WinZip (alhough there are other freeware programs available) to compile the file as a self-executing zip that runs a program when executed. This way you can run the self-executing zip which un-zips itself and runs the BAT file which, in turn, carries out the commands you want before finally deleting itself.

Hope this helps...
 
Rick998,
I would just like to create exe file to hide the code from unauthorizated people to see it or change it. I use this batch file to distribute it over the intranet and I am afraid someone will change it and then will bother me that batch file is not working.

So my puprose is to create exe from bat file to hide code and prevent to change the code from people.

Thanks,
Grofaty
 
grofaty,

I understand what it is that you want to do. I have to do exactly the same thing within the organisation I work for. Unfortunately, there isn't any freeware/open source compiler that I know of.

Did you try my earlier suggestion that you add a line to the BAT file to delete itself after running?

Have you considered changing the batch file to a VBS script and then encoding it? I know encoding it isn't a particularly strong method of protection but it should deter most people from changing the code within. You could also combine my earlier suggestion of self-deletion so, after it ran, there wasn't any file left to change.
 
grofaty,
since it is over the network i can think of 2 possible solutions:
1) don't allow users access to the folder(s) where it is kept / placed.
2) create it dynamically (to expand on a previous suggestion) - that is create a .bat job on a secure server / pc. using echo statements create the .bat file that will actually be run where it needs to be. run the secondary file then delete it.

regards,
longhair
 
MarkhP

Excellent find... works great and looks like the perfect solution to grofaty's query. Have a star.

Rick
 
Rick998, MarkhP,
my batch file is not a program to run some tasks and then could be self-deleted.

My batch file looks into relation database and returs some detailed data about table.

MarkhP solution is not good for me, because exe file should return result into current command prompt window. MarkhP suggestion program executes in seperate window and exit after execution. So I can't see the result.

So actually I need a bat to exe compiler, that writes the output of execution file into current command window and doesn't close command window or is not executed in seperated window.

Thanks,
Grofaty
 
You could just add "pause" at the end of the batch file, that would leave the command window open. Tho I don't know if this would carry over to the .exe version, I personally have never done it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top