|
||||||
VBScript is very easy to distribute. However, to protect the code the programmer may wish to consider creating an installation package with IExpress
When it comes to creating Microsoft Windows applications VBScript is always a good choice. That's because of two reasons:
However, this ease of development can also cause problems for the application programmer. If the programmer only needs notepad to develop the application then that's all that a user needs to change it. Once the developer passes their application to a user then they lose all control over any changes that may be made to it. If this is likely to be a problem then the programmer may want to consider using a distribution package to protect the code. Microsoft Windows actually comes with it's own distribution package - IExpress (short for Internet Express). This can be used to package and to run an application without the user being aware of any of the technicalities of the application. However, there is one minor problem to overcome - IExpress does not automatically recognize a vbs file as an executable. Preparing a VBScript Application for DistributionA VBScript Application user normally runs the application in one of two ways:
It's this ability to run the vbs file by using CScript that allows the programmer to create a bat file, and it's this bat file that will be run by IExpress. Of course the first step is to create the vbs file itself, for example c:\vbscript\hello.vbs: dim text : text = "Hello World"
msgbox text
The bat file to run this (for example c:\vbscript\hello.bat) would contain: cscript hello.vbs
With that the programmer has everything that they need to create a distribution package. Creating the Distribution PackageThe first step to creating the distribution package is to run c:\windows\system32\iexpress.exe. This will start the IExpress wizard which consists of a number of screens that help the programmer to create the package:
At the end of the process a new distribution package will have been created, and this can be passed on to any users (for example by uploading the package on to a web site or network folder). The users will then be able to run the application without even knowing anything at all about VBScript.
The copyright of the article Distributing a VBScript Application in Windows Programming is owned by Mark Alexander Bain. Permission to republish Distributing a VBScript Application in print or online must be granted by the author in writing.
|
||||||
|
|
||||||
|
|
||||||