Create a Windows executable (.exe) from Batch and Vbscript - batch-file

It is asked me to create a Windows executable (.exe) from scripts written in batch and vbscript. unluckily I don't know which tool use to realize that. Therefore Let me ask you some questions which torment my spirit
Is it possible to make a such build?
If it is, could you recommend me some open tools which do that?
To make an exe from bat+vbs, do you think I have to modify the
content of my scripts alot/a little?
Thank in advance for your feedback

Bat2Exe converts batch files including any other files in a certain folder into executables
http://www.bat2exe.net

"ExeScript Editor" can convert batch files under .bat and .cmd also it can convert .vbs and .vbscript file into a .exe
http://www.scriptcode.com/vbscripteditor/

What you want to do is:
First : Join the bat files and vbs files together in one file.
Second: "Make" a executable of that file to launch the main bat file.
Bat/VBS file can't be compiled, when you see a "compiled bat" it's only a simple .exe stub, the bat is not compiled neither converted, is only stored, so first you need to use a joiner and second you need to use a bat-2-exe "converter" like "ExeScript Editor", searching for the crack in Google to evaluate the program is not hard, I have it.
...But really the best you can do is to use WinRAR application with the SFX options which can join files (compress), make the exe, and can launch the main bat file after silent extraction.
PS: Really the best you can do is to learn the basic things of a real lenguage, embbed the bat/vbs files as resources and then compile it into a standalone executable.

Related

Quickest way to create a .bat file (as .txt)

I have a couple lines of code in a batch file in Windows 10 that open a session of Octave, and load a script that uses design parameters contained in a .txt file. The batch file is named (for example) "Design123.bat", and when Octave runs, it automatically finds the design parameters in the file "Design123.txt" by simple string manipulation of the file name, i.e. strrep(filename,".bat",".txt"), where filename = '%~dpn0' is passed to Octave from the batch file. This allows for the contents of the batch file to stay simple and constant, and the file name of the batch file is the only thing tying it to the .txt file.
I do all of this to allow running the Octave script by double-clicking the batch file for convenience, instead of being forced to use the more tedious process of uigetfile in Octave. This works very well, but the catch is that I have to place a copy of the batch file in the same directory with the design (.txt) files (of which there are thousands, but each within their own directory) and give it the same file name to get it to work. Is there a way to quickly create the batch files somehow? The most ideal situation I can think of is to be able to right-click (or somehow select) a .txt design file, and create a batch file (replacing .txt with .bat) and place my lines of code into it.
Any ideas? I have coding experience, but only in software packages like VBA and Octave, not within operating systems themselves, though certainly willing to learn if I could get pointed in the right direction. The design file names follow a distinctive pattern, so they could be filtered easily within an operation on the active "File Explorer" window in Windows 10, if something like that is possible. Thanks in advance.
You might want to compose the answer to your question from calling the script on the right click and running the .m script with command line arguments.
If that fails, uigetfile is certainly not the only method to get file. At the very least you could always copypaste a path string to a folder from explorer to octave function call.
Finally, I guess I'll mention the existence of octave-cli which runs in terminal instead of gui. It might be better suited for running non interactive scripts.

Move files into a jar with a .bat script

Just the title. I'm trying to make a .bat file that moves stuff into a .jar, but I have no idea what to do, or even if it's possible. If it's possible, could I be pointed towards the information that would allow me to create such a .bat file? Thanks.
"A .jar file is just a .zip file with a different extension. Use any zip tool that takes command line parameters like WinZip or 7-Zip, and call it from your batch file passing it the right information in the parameters to add the files. Once you pick your utility app, you can read its documentation to find out what parameters it takes and what order they should be in. (Or more easily, you could just open the file in WinZip or 7-Zip and drag and drop the files in using Windows Explorer and save the time and effort.)" - From Ken White, in a comment
Thank you Ken White, for your answer.
While I do agree not using commands is more convenient, I can't automate moving files without commands or code.
This is a valid answer. But for some reason an arbitrary restriction won't let me mark this post as the answer until two days.

Is it possible to convert an EXE file back to a Bat

A few years ago I made a batch text based RPG and I wanted to go back to it, but I found the EXE of the game but I was wondering if it's possible to revert it back into bat format?
edit: Sorry for the lack of information, A few years ago I used a bat to EXE converter and I'm wondering if I can convert the EXE back into bat format to work on the game again, the EXE was also found on an old cloud of mine so that is the only file present
Well this is possible... the truth is most Batch to EXE converters don't actually convert your code, but instead wrap them in an exe file.. so when you run your exe what its actually doing is placing a copy of your original batch file into your temporary directory and running it from there...
what you need to do is open your user file.. thats the directory that holds your documents and pictures and whatnot.. and at the end of your user directory in the address bar, type..
\AppData\Local\Temp
or %temp% in your command line

making .exe from .bat file tools and solution with dependencies

I have got a solution that uses a .bat file to start. I need to make it a .exe. I have used different tools like [BATch to EXE], [Bat_to_exe_converter], Bat to Exe Converter from [f2ko] which was the most modern one. I need help on the last one which is more sensible to work. or any other solution that makes a working .exe file. Right now, after converting the file to exe according to dependencies the start-up process will not complete. I should mention that the bat file is the Pentaho start-up file.
I have also used IEXPRESS from windows but the error after running the result exe is:
"Error creating process . Reason: The system cannot find the file specified."
Thanks,
Sounds like you need Carte. Carte is a web service that allows remote execution of jobs and transforms.
Carte User Doumentation
You'll probably also need to see this:
Carte as a Windows Service

Make a Single EXE from BATCH and 2 EXEs

I have a script (a.bat) that calls 2 executables (b.exe and c.exe) and I would like to create a single exe that would call a.bat automatically.
Is it possible?
Any simple program to do this?
Ps.: Info: The Exe's do make other files that are deleted in the end
Not directly, no.
The simplest way to accomplish this with off-the-shelf tools is to use an archiver that can create self-extracting archives and allows to specify a file to run after extraction. For example, free Info-Zip tools support an autorun command. WinRAR (commercial) allows to define complex scripts with GUI.
An install engine can be used for the same purpose. For a couple of examples, there are NSIS and Inno Setup (both free).
A (relatively) more complex solution is to write a third executable that will extract payload from its resources and run the batch file. This way you have full control over what happens.
This One:Bat To Exe Converter
It has the "Include" option that can include the exe file
when the compiled exe file run
it will release it
and you can run it!

Resources