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)