Script32 is a fast and secure free tool that converts your VBScript/Javascript (*.js) (to run under Window Script Hosting WSH) to Win32/Win64 Executables.
Script32 Features
- It is a command line tool (Also it can be used together with the GUI) which supports flexible switches.
- The executables compiled can be configured into using CScript.exe or WScript.exe, or MSScript Control (without relying on the CScript.exe or WScript.exe)
- The source codes of VBScript/JScript/HTA are encrypted and hidden well in the executables.
- For [ScriptControl] Mode, the source code of VBS/JS are _NOT_ extracted to hard disk at all. Rather, the source code is encrypted and executed in RAM, which promises a higher security.
- 32/64 bit executables can be generated on the fly.
- *.vbs, *.js and *.hta supported.
The processing looks like below, where you can put as many pairs of files as possible in the command line for conversion.
The sizes of the converted files are fixed. The 32-bit is 544 KB and the 64-bit is around 293KB.
Don’t be Alarmed if the file is reported as a Trojan by anti-virus software (It uses decent encryption protection technique which might be treated as malicious code). It is a false alarm. You have my word! but make sure you backup the scripts before you use this; and use Script32 at your own risks.
If you think command line tool is not convenient for you, you might consider the following GUI tool.
The GUI tool is created using Microsoft .NET framework 4.0 Client. It is small (21 KB uncompressed).
It invokes the Script32.exe and can configure the basic for a batch of files to convert. Easy/Simple to use.
Please make sure you have both in the same directory.
You can write a batch script that easily looks for all scripts in the directory.
for %%i in (*.vbs) do ( Script32.exe %%i %%i.exe )
Well, since this tool converts the script using MS Script Control, the WScript object is not available if you use WScript.Echo etc under WSH. [See here].
e.g. You might need to consider replace WScript.Echo with MsgBox before feeding into Script32 if you decide that the script is executed in MS Script Control.
You can also create a simple HTA to use this conversion tool.
–EOF (The Ultimate Computing & Technology Blog) —
loading...
Last Post: WScript Object in MS Script Control
Next Post: A Quick Check If 32 or 64-bit OS
What is really missing is the ability to change the icon and information about the version and copyright. Any program for replacing icons does not work with exe files that are compiled by Script32. The program stops working.
Great tool! using MS Script Control, the WScript object is not available if you use WScript.Echo etc under WSH… So how do you quit your script if you need to inside of a function for example?
You can CreateObject(“WScript.Shell”)
In function, you can return the Exit Code, then quit outside the function. For example,
Function Test()
Test = 1
Exit Function
End Function
If Test() = 1 Then
‘ Quit here
End If
For [ScriptControl] Mode, the source code of VBS/JS are _NOT_ extracted to hard disk at all….
Where does the file get extracted to if i run the exe in regular mode?
to some temp folder? what if i want to hide the sourcecode but don’t want to use a lot of memory?
regards
Windows has a hidden program called iexpress that will create, package and CAD all file types such as .js, .hta, vb, and .bat files into perfectly executable and or install-able programs and also saves Versioning as saved SAD files,, It allows you to compress them into .cad files for easy deployment as well. So why does anyone need all this for? lol It even works with python files if you add a promt in your .hta index file to have the user add that version of python or add it as a zip installer with your cad package, have your bat execute the unzip and it will install it and have the .bat point and execute that python.py file.. A deployment package can have many executable’s too. Another secret is all windows come with a ExeScript app.. It will convert all the scripts you mentioned into single executable’s too.
we want an exe only. Windows pack these files, but it will unpack them at some point to the temp directory.
That is exactly what iexpress does and its free in all versions of windows, Select in iexpress “compress” and it creates a single executable file for your .bat files and scripts files you add and creates a install wizard cad for the installer.. ExeScript is also Free in Windows and it will create or convert all the files you listed into BAT files from .all the files types you listed..
No. ExeScript unpacks hta. This can be seen in Explorer.