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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prevent editing VBScript on a flash drive

Status
Not open for further replies.

tbscmgi

MIS
Sep 17, 2003
66
US
To All-
I have a VBScript on a flash drive, is there anyway to prevent anyone from editing it.

Thanks
Tony
 
Keep the flash drive in your pocket!

Use either physical security or NTFS permissions to block access.

The script encoder is good for casual browsing of files, but if someone can access that they can run the script decoder to view the contents.

There is a misconception that the script encoder is an encrypter which it is not. The script encoder simply uses an algorith to change the displayed text. There is no security key used to lock the data.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
 
You could compile your script as an exe. Just be aware that some of the VBS2EXE-type programs out there can create very bloated executables and often extract your script temporarily at runtime, during which time the script is viewable in its original format.

If you don't mind paying then both AdminStudio and PrimalScript 4.0 Prof can compile scripts. I tried AdminStudio quite some time ago but found the compiled executable to be quite large, over 120k (which may be smaller now).

I ended up using PrimalScript 4.0 Prof which is use one-click creation of compiled executables and doesn't create such large compiled executables, e.g. a 1k VBS script compiles to a 96k executable, some of which is the embedded icon.

Another method which I also use is to 'wrap' the script using Visual Basic 6. It takes a little longer but a 1k VBS script compiles to about 20k, most of which is the embedded icon.

Hope this helps...
 
I have as yet to find any VBS exe creator that does not either extract the script in clear text to a tempfile when running it or store the script as clear text in the exe.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Have you looked at NS Basic/Desktop?

I haven't run its output with FileMon running but I haven't seen any temp files created with the script source in them.
 
AutoIT is free, and quite similar to VBScript. If you download the SciTe editor (also free), you can run the scripts from inside there as well as compile them into .exe files. The editor is fairly complete IDE for scripting, too.

Lee
 
Well there is the option of a conversion to VB6, which is pretty trivial for the most part.
 
If you go the VB6 route, just make sure you include all the needed application extensions on the Flash drive with the application.

Lee
 
I'd assume a WSH script converted to VB6 wouldn't use any extensions. Of course you may need substitutes for things in WSH's object model, most often Sleep(). These can be done inline though without using external components.

The conversion is pretty easy for the most part, and a couple of orders of magnitude easier than converting to VB.Net. Compile to pcode since speed isn't an issue. Pcode will result in a small EXE. Of course you need VB6.

For most scripts VB5 would be a fine alternative, except that the runtime components are not included in later OSs like the VB6 runtimes are.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top