Tools written by Roy/SAC

VBScript to Win32 EXEcutable 1.0A

   Back to List of Tools Written by Roy/SAC


VBScript files are handy and easy to create and use for anybody who is familar with the "BASIC" programming language. Languages like "Visual Basic", Classic "Active Server Pages" (ASP) or "Visual Basic for Applications" (VBA) are similar to almost identical to VBScript.

While you can compile programs in Visual Basic to an Executable, .VBS files cannot. The code remains plain text and must be executed as such via the script hosts "WSCRIPT.EXE" (for interactive scripts) or "CSCRIPT.EXE" (for command line or non-interactive batch scripts) in windows.

Windows Explorer typically recognizes VBScript files, if they use the proper extension e.G. .VBS and runs them via either WSCRIPT or CSCRIPT, depending on which is set as the default (typically WSCRIPT), if you double-click to open them.

Tool Summary

Tool Name
Current Version
Programming Language Used
Short Description
Latest Version Download

Please Note! ... that all of my tools posted on my web site are using the Free Art License (FAL) 1.3 (Copy left Attitude), which means its free to use, share and even modify and redistribute, as long as your modified version is still free and not commercially distributed. If you want to exploit the software commercially, you would have to contact me and negotiate terms.

Needless to say, but better safe than sorry.... using my tools does not make me liable for any direct or indirect caused damages or losses, because of the use of them. You use them at your own risk. If you are paranoid, don't use them, if you are not understanding what I am saying here, don't use them either.



Main Window


What the Hell is This?

This tool lets you create an Win32 Executable out of your .VBS or .HTA script and even lets you include a customized ICON file for it as well. Behind the scene, for the novice user invisible your original script code is exported to the temp directory and there executed by either WSCRIPT or CSCRIPT, with the difference that you specify which one is used regardless of the default setting in the users system or even if .VBS scripts are recognized at all or not.

Once the script finished, it will be removed automatically, leaving no trace that it has ever been there.

The usage of the tool is simple. You open the script file to convert and the path and name of the executable of your own choosing. Optionally you can select the location of the ICON that you would like to use for the executable and how you would like the original script executed, using WSCRIPT for the interactive mode or either the CSCRIPT command line or CSCRIPT non-interactive batch mode. For HTA scripts, you must select the .HTA execution option.

When you convert the script, the executable will be created and also the used converter settings are being saved in the original script file. It will insert at the very top a code block locking like this:


In the case of .HTA files, this block will be encapsulated in <l!-- and --> and added after the <HTML> tag.

Next time you open the same script via the converter again, it will automatically preload the same settings that you used for the last conversion, the path and name of the output executable, path and name of the icon file to use and the execution method.


The Command Line Version Syntax

The command line version can do pretty much everything which you can also do via the interface version.


VBS2EXECommandLine.exe <SCRIPT> <EXE> [/mode:w|c|s] [/batch] [/icon:] [/h|/?]


VBS2EXECommandLine.exe <SCRIPT>*

*<SCRIPT> = the script file to process for example c:\temp\myscript.vbs


Parameter Options/Description
<EXE> = The Output EXE File Name*

* If suppressed, read settings from script file is assumed. See 'Settings from Script' below.

/mode: c|w|s - Script Execution Mode (Default: c)
  • 'c' (or 'cscript' or 'cscript.exe') = Use CScript
  • 'w' (or 'wscript' or 'wscript.exe') = Use WScript
  • 's' (or 'start' or 'direct') = Call Directly
/icon: <ICON filename> Optional, Path to .ICO Icon File to include (e.g. c:\temp\myicon.ico)
/batch Use Batch mode. Only valid for CScript to enable /b Option
/? | /h Help screen

Settings from Script

Conversion options are automatically added to <SCRIPT> Source. This allows the simple execution of this tool the next time. You only need to pass on the <SCRIPT> file as the only parameter. You can also add the settings yourself before hand, if you wish.

The Settings are stored as Script Comments at the beginning of the Script. Nothing else except an 'Options Explicit' statement is allowed before it (including other comments)


Notes: Use full paths for <EXE> and <ICON>
BTC=Batch, 1 = True, 0 = False


Previous Versions