mr_unreliable
Wed Jan 30 14:44:32 CST 2008
soler wrote:
> Anyone knows of a tool preferably open source or commercial that can create
> exe from .vbs and .js scripts?
>
hi Soler,
There are several ways to do this, but none of them are
entirely satisfactory. If God had intended for a script
to be an exe, then microsoft would have provided it.
Way One. Use the Admin Script Editor" product, which
has a "packager feature" (formerly called vbScript-to-Exe).
http://www.adminscripteditor.com/editor/scriptpackager/
You are going to have to pay for ASE, but it is probably
the quickest way to what you want.
Way Two. If you wait around a bit, mayayana will probably
come along and recommend an "installer" product (Power
Archiver). There are any number of installers out there,
some for sale and some free, and you can use them to wrap
up your script into an exe, along with instructions on
how to "install" your script (unwrap and place on a target
system).
Way Three. This is the "roll-yer-own" approach. Get
yourself a vb (classic) compiler, and a copy of microsoft's
"windows script control":
http://www.microsoft.com/downloads/details.aspx?familyid=D7E31492-2595-49E6-8C02-1426FEC693AC&displaylang=en
The idea here is that the script control can run your script
INSIDE an exe. So you compile an exe with the script control
instantiated. In your program, you can load your script into
the script control, and then execute it. You may include the
script in your exe (program) as a text array, or if you want
to get fancy, as a text "resource" (which you compile into
a "resource file" with microsoft's resource compiler (rc.exe).
There is an example of this posted previously in this ng.
There are other approaches. If you go to Google's Advanced
Group Search:
http://groups.google.com/advanced_search
and type "vbs to exe" into the search engine, you will get
several pages of hits.
As was previously mentioned, your best bet is to convert the
vbScript to another language that supports compiling (or
wrapping) into an exe (for example: autoit, FBSL, o'Basic,
RapidQ, etc). Also, if you can get a copy of a "classic" vb
compiler (vb5/6) and convert your vbs into vb, then you can
compile directly to an exe.
cheers, jw
____________________________________________________________
You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)