PScript Portable Software Script Host

I am not in a position to do any more work on MMM right now, but I have cleaned up and repackaged a small utility that can be useful with "MMMed" programs meant to be run from portable media.

Portable Applications

One thing MMM is useful for is creating portable software in VB6.

But what I have found is that some programs just work a lot better if their data is on the hard drive.  The performance is better, "wear" on flash memory drives is less, and for CD-based runs anything that needs to be altered in use (even if you don't need the updates afterward) just won't work on your source medium.

I got sick of CMD/BAT files quickly, the dangling console windows are extra clutter and just plain ugly.  WSH scripts worked as a wrapper, but when I use the computers at my local library the scripts fail: they have WSH, the FSO, etc. locked down for safety.

PScript

So I ginned up a custom script host for running wrapper scripts, and I'm calling it PScript (as opposed to Microsoft's CScript and WScript).  So far it does the job just fine.

PScript exposes a fairly small object model to the scripts, which can be written in VBScript or JScript.  Most of the object model provides disk operations such as copying files and folders.  There is also a Run to run your wrapped application.

The basic idea is to launch a PScript run instead of your application program itself.  The script will copy work files from a folder or folders on your portable media to a hard drive location, such as a folder created under AppDataLocal.  Then the script runs your program and optionally waits for completion.  After your program is closed (or crashes) the script can copy back altered data and clean up the hard drive folder(s) you used.

Your portable application should be basing writable data file locations on its current directory and drive (CD) or rely on command line parameters.  The script can set CD before the Run of your program to point to the work file location.  Or if your program pays atetntion, it can pass command line arguments to it as well.

Finding PScript

While retaining Copyright, I am making PScript source and binary available for anyone to use and create derivative works from.  You can find all of this along with documentation over at:

PScript - Portable Software Script Host

I hope some of you find it useful.

Note: This PScript is completely unrelated to the Perl-related tool of the same name.

Sorry, I usually try to avoid namespace collisions so I don't step on any toes.

Posted by BVOCS on Friday, August 5, 2011 02:30 PM

Post a comment

  • Name:
  • E-Mail Address (optional):
  • URL (nofollow, optional):
  • Remember personal info
  • Comments (text only):