Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compiling wsh scripts 2

Status
Not open for further replies.

mrnez

Technical User
Sep 11, 2002
37
GB
Hello All

A quick question

Is it possible to compile wsh scripts into .exe using Visual Basics compiler.

Thanks

Richard
 
Not directly, but the code is very similar so it won't take much to make it run.
If the only reason you are compiling is to hide your code, there is an encode utility that turns your script into unreadable rubbish:
Run it from the command line
SRCENC inputfile outputfile

HTH

Ben ----------------------------------------
Ben O'Hara
----------------------------------------
 
Sounds good, where would I obtain this software ??

Thanks

Rich
 
it comes as part of the Windows Scripting Host.
Just open a command line or run box and type :

SRCENC inputfile.vbs outputfile.vbe

you need to put the vbe extension on so that wsh knows it is encoded.

If you haven't done already, I suggest you download the scripting docs from Microsoft and look for encode!


Have fun

Ben
----------------------------------------
Ben O'Hara
----------------------------------------
 

It should also be noted that these encoded scripts can be easily un-encoded. For the most part, users won't know this - but I would guess other scripters know this.

I bring this up as a warning - I wouldn't include your domain administrators password in this script.

Chris
 
I've tried running SRCENC at the command prompt in Win2K server and get the error "SCRENC is not a recognized command" can you tell me why? as I oviousley have WSH installed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top