Link to XLnow Homepage
back to OnScript Homepage

Read this article for step-by-step instructions on how to easily add the
VBScript samples files available from the Microsoft TechNet Script Center
to your disk and integrate them in the OnScript Editor as a Script Library.

Add over a thousand VBScript Samples to your OnScript Library
Sample scripts are a great resource when it comes to figuring things out and getting ideas about how to accomplish an automation task using scripting. While there are many websites, books, magazines devoted to Windows Scripting, it is sometimes great to have a collection of samples available on your own machine - at your fingertips.
Step 1: Unwrap the Do-It-Yourself Kit

Download and unpack the Do-It-Yourself Kit to a folder on your machine. If you don’t already have the do_it_yourself_kit.exe file, you can find it in the “Prerequisites” section at the end of this page.

In this example I unpacked it to “C:\Program Files\Microsoft Scripting Tools”.

The EXE will unpack a bunch of files to the folder you specified. For the purpose of these instructions we are interested in the Access Database script_center_2.mdb and the first two VBScript files.

Feel free to browse the documentation and other script files to get an idea of further possibilities offered by the Do-It-Yourself Kit.

Step 2: Create Folders and Files

The scripts we will run to generate the sample files are not very flexible and will do exactly two things: create a folder structure beneath C:\Code and generate VBScript files in the subfolders.

To keep things simple, this is all we cover in these instructions. If you want the folder structure and files to be stored somewhere else or are interested in other script files types such as JScript, Perl, Python and others then take a look at the document called “Creating a Set of Stand-Alone Scripts”. You will have to apply some simple changes to the scripts we use here.

Create a Folder called Code in the root of the C: drive.

Then, from within Windows Explorer, run the code_folder_maker.vbs script. It won’t bother telling you when it is done or anything, but it runs rather fast. Now you should see the folders it created in C:\Code:

If you are curious, expand the complete folder structure (press *) to check the subfolders the script just created:

Next, run the code_maker.vbs script (also from within Windows Explorer). This is the script that generates the actual script files and it runs a minute or longer. While it does not really give you an indication of progress, you can see it accesses the Access Database file because a temporary LDB file suddenly appears:

As soon as the script is done, the LDB file disappears and you should be able to see some VBScript files in any of the leaf folders (lowest):

Step 3: Register the Content as a new Library
Now that the sample files have been created we will register them as a script library with the OnScript Editor.
  Don't have XLnow OnScript installed yet? Time to do so now: Free Preview of OnScript
Switch to the Library tab and press the right mouse button to access the shortcut menu and run the New Library command:

Enter the library name (this is how our new content will appear on the Library tab). In the example below I called it “Script Center Samples”.

Then, set the Library path by browsing for C:\Code:

This is what the Library Properties looked like after I did this:

Now you're all set...

Step 4: Enjoy 1627 VBScript Samples in OnScript
Now that you registered the sample files you can start using them in OnScript. Explore the content and open any script file you are interested in by double-clicking the Library entry or choosing the Open command from the shortcut menu. Then just treat the sample script as you would treat any other script: examine it, run it, tweak it:

What’s Next?
Of course you can add any other collection of scripts that you might have available; just create a new Library and point it to the corresponding folder of your file system.

As mentioned above this simple procedure created only VBScript sample files. Read how to add other file types in the “Creating a Set of Stand-Alone Scripts” document.
Do-It-Yourself Script Center Kit (a Microsoft Download)

The Do-It-Yourself Script Center Kit includes all the materials you need to create your own version of the TechNet Script Center, either as stand-alone Web pages, stand-alone .vbs files, or as a .chm Help file. Included in the Kit are a database of all the scripts found in the TechNet Script Center Script Repository, as well as helper scripts for creating Web pages, .vbs files, and .chm files. The Kit also includes instructions for using these helper scripts. Try it now!