I need a (1) cheap (preferably free) and (2) easy way to convert VBScript
files to stand-alone executables. I know that Visual Studio 6.x can do it
very easily, but being that it will no longer be supported as of March 2008,
I am looking for another solution. The ideal solution would be a simple
method for Visual Studio Express edition to convert from VBS to executable
files. I have tried to do this and have not found a way that is anything
close to the ease of Visual Basic 6.

I realize this question was posted in April 2005, but the answers are not
quite what I am looking for.

Re: Compile .vbs files to .exe executables by Richard

Richard
Mon Apr 09 17:17:52 CDT 2007

Jake Wiseman wrote:

>I need a (1) cheap (preferably free) and (2) easy way to convert VBScript
> files to stand-alone executables. I know that Visual Studio 6.x can do it
> very easily, but being that it will no longer be supported as of March
> 2008,
> I am looking for another solution. The ideal solution would be a simple
> method for Visual Studio Express edition to convert from VBS to executable
> files. I have tried to do this and have not found a way that is anything
> close to the ease of Visual Basic 6.
>
> I realize this question was posted in April 2005, but the answers are not
> quite what I am looking for.

Best might be to use Visual Studio 6 to convert the VBScript to VB6, then
open in Visual Studio .NET and let the wizard convert. What the wizard
cannot handle is going to require a lot of work no matter how you do it.
Also, any VB6 executable you create should be fine.

--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--



Re: Compile .vbs files to .exe executables by MikeB

MikeB
Mon Apr 09 18:57:44 CDT 2007

quickly googled

http://www.nsbasic.com/desktop/


"Jake Wiseman" <Jake Wiseman@discussions.microsoft.com> wrote in message
news:08D89A88-4450-459F-A0F9-7513BB26C839@microsoft.com...
>I need a (1) cheap (preferably free) and (2) easy way to convert VBScript
> files to stand-alone executables. I know that Visual Studio 6.x can do it
> very easily, but being that it will no longer be supported as of March 2008,
> I am looking for another solution. The ideal solution would be a simple
> method for Visual Studio Express edition to convert from VBS to executable
> files. I have tried to do this and have not found a way that is anything
> close to the ease of Visual Basic 6.
>
> I realize this question was posted in April 2005, but the answers are not
> quite what I am looking for.



Re: Compile .vbs files to .exe executables by mayayana

mayayana
Mon Apr 09 18:15:18 CDT 2007


> I need a (1) cheap (preferably free) and (2) easy way to convert VBScript
> files to stand-alone executables.

Can't be done. A script is interpreted code.
An EXE is compiled. Nothing compiles
script ... because it's not programming code.

> I know that Visual Studio 6.x can do it
> very easily,

No, it can't.

> but being that it will no longer be supported as of March 2008,

What does that matter?

> I am looking for another solution. The ideal solution would be a simple
> method for Visual Studio Express edition to convert from VBS to executable
> files. I have tried to do this and have not found a way that is anything
> close to the ease of Visual Basic 6.
>
> I realize this question was posted in April 2005, but the answers are not
> quite what I am looking for.

A stand-alone executable means one that doesn't need
support files. If you want to make an actual EXE that has
nothing to do with script. You can't convert a script to EXE.
If you write an EXE in VS6 (VB or C++) it's almost stand-alone,
insofar as almost all systems will have the support files.
VS Express is dotnet v.2. That requires that the 70+ MB
dotnet V.2 runtime be installed. You can write a pseudo-EXE
in C# or VB.Net, but that's not stand-alone in most scenarios.

Another option is to just put it into a zip file and make
that a self-executing zip (exe). Set the command line
to the name of the VBScript. The only problem with
that is that it requires the WSH (so not stand-alone) and
it may get blocked from running by anti-virus programs.



Re: Compile .vbs files to .exe executables by Andreas

Andreas
Tue Apr 10 05:42:07 CDT 2007

I've got one for you.

Have a look here:
http://www.f2ko.de/English/v2e/v2e.html

Andreas

Re: Compile .vbs files to .exe executables by mr_unreliable

mr_unreliable
Wed Apr 11 16:35:08 CDT 2007

mikHar usually steps in here and recommends the "Admin
Script Editor" (the Script Packager feature will wrap your
script into an Exe). Since he is apparently out-to-lunch
right now, I will make the suggestion for him. You can
find the A.S.E. here:

http://www.adminscripteditor.com/editor/features.asp

Sorry, it's not free ($100 bucks).

Then there is my own (boast, boast) classic discussion
on "Cheap and Dirty" methods, found here:

http://groups.google.com/group/microsoft.public.scripting.vbscript/browse_thread/thread/599e1512a9a1ff52/65533e537dbd4ed0?lnk=st&q=&rnum=5#65533e537dbd4ed0

Probably the most "professional" and free approach would be
to switch to autoit (the scripting language):

http://www.autoitscript.com/autoit3/

The autoit and vbs scripting languages are very similar,
and you could convert quite easily. If you are too lazy
for that, you can find "converter" code on their forum:

http://www.autoitscript.com/forum/index.php?showtopic=12143

After you are running in autoit, you can then convert your
script to exe directly, using the Aut2Exe utility which comes
with the autoit package.

<quote>
It is possible to take your .au3 script and compile it into
a standalone executable; this executable can be used without
the need for AutoIt to be installed and without the need to
have AutoIt3.exe on the machine. In addition, the compiled
script is compressed and encrypted and there is the option
to bind additional files (also compressed/encrypted) to the
exe using the FileInstall function. Also, any #include files
will also be compiled into the script so they are not
required at run-time.
</quote>

Jonathan Bennett and his autoit gang deserve a lot of credit
for coming up with a language like that with all the bells-
and-whistles. In many respects autoit puts vbs to shame.
Be sure to send them some paypal cash to keep the effort
going.

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)

Jake Wiseman wrote:
> I need a (1) cheap (preferably free) and (2) easy way to convert VBScript
> files to stand-alone executables. I know that Visual Studio 6.x can do it
> very easily, but being that it will no longer be supported as of March 2008,
> I am looking for another solution. The ideal solution would be a simple
> method for Visual Studio Express edition to convert from VBS to executable
> files. I have tried to do this and have not found a way that is anything
> close to the ease of Visual Basic 6.
>
> I realize this question was posted in April 2005, but the answers are not
> quite what I am looking for.

an after-thought (the installer option)... by mr_unreliable

mr_unreliable
Fri Apr 13 12:31:29 CDT 2007

I just remembered that there had been previous responses
to this question to the effect that you could convert
your script to an exe by wrapping it in an "installer".

As you know, an installer "installs software" -- a process
which can be as simple or as complicated as you like. The
installer is typically an exe file, with "other stuff"
bundled into it. The "other stuff" can be programs, data
files, actX objects, registry changes, utilities to run...
in other words all the "stuff" you need to install your
software.

Most installers worthy of the name can do at least the
following:

- Wrap up program files and data files into an exe,
for extraction and installation later.

- Run utilities

And so, consider the "installer option" for converting
a vbs script into an exe.

Simple Case (Your target system has scripting installed):
Wrap up the script into the exe, and include instructions
to copy it out to the client system and run it.

More Complicated Case: (Your target system does NOT have
scripting installed). Wrap up the script, plus wscript
and its associated dll's. The installer then copies out
all this stuff to the target system, and runs the script.
If this is a "stealth run", then you may wish to erase
the script and wscript files when you are finished.

For you guys/gals who know the Microsoft Installer product,
then you are all set for this option. Or, if you want to
try it, then it's available in the Vista SDK (a 5hr download
at slo-DSL speed). If you are using something older than
Vista, you may be out-of-luck, I didn't see any SDK download
available for older systems. As I recall, you may have
the installer if you have Visual Studio. Caution: you may
thing that you have the microsoft installer on your system
already, because when you click on an "msi" package, it gets
installed. But Wait! -- I'm talking about the program which
packages up the stuff to install in the first place.

For the rest of you, I suggest the "Nullsoft Scriptable
Install System". It is free, and is available (with source)
from "Source Forge", provided you will agree to the usual
open-source licensing terms and conditions. There is a
"stable" system offered, and a (presumably more risky)
"beta" version.

http://nsis.sourceforge.net/Main_Page

http://nsis.sourceforge.net/Developer_Center

The appeal of NSIS is the scriptability of it. It's not vbs
(or vba for that matter), but apparently you can script it
to do almost anything. In fact, for many if not most scripting
functions, you could do most of them directly with NSIS,
without bothering to run a vbs script at all. But getting back
to the main issue, you could bundle up your script in an exe
installer package, copy your script to the target system, and
then run it. You could also script in a test to see if the
system had scripting installed, and if not then install wscript
and the associated dll's too.

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)


Re: an after-thought (the installer option)... by E

E
Mon Apr 16 23:00:33 CDT 2007

mr_unreliable wrote:
<SNIP>
>
> http://nsis.sourceforge.net/Main_Page
>
> http://nsis.sourceforge.net/Developer_Center
>
> The appeal of NSIS is the scriptability of it. It's not vbs
> (or vba for that matter), but apparently you can script it
> to do almost anything. In fact, for many if not most scripting
> functions, you could do most of them directly with NSIS,
> without bothering to run a vbs script at all. But getting back
> to the main issue, you could bundle up your script in an exe
> installer package, copy your script to the target system, and
> then run it. You could also script in a test to see if the
> system had scripting installed, and if not then install wscript
> and the associated dll's too.
>
> cheers, jw
> ____________________________________________________________
>
> You got questions? WE GOT ANSWERS!!! ..(but,
> no guarantee the answers will be applicable to the questions)
>
As an interesting side note. Their is not currently a way to decompile these installers.
Not sure of the specifics, but apparently, it has to do with the lack of structured code.