The VBScript Network and Systems Administrator's Cafe:

VBScript


June 20, 2008  3:19 PM

VBScript Statements: Explanation of the Erase statement



Posted by: Jerry Lees
dimensional arrays, erase, VBScript, VBScript Statements, vbscriptstatements, working with arrays

The VBScript Erase statement is used to erase all the values of an array, but keep the array size and dimensions intact.  This is useful when you re-use an array and you want to ensure the values inside an array have truely been cleared and no old data is left in the array. For example, the...

June 18, 2008  1:14 PM

VBScript Statements: Explanation of the Exit statement



Posted by: Jerry Lees
exit, VBScript, VBScript Statements, vbscriptstatements

The Exit statement in vbscript allows you to exit a block of code, in the case of a subroutine (Exit Sub) or a function (Exit Function), or the entire script.

This statement is assumed at the end of a script, and therefore is not required, but is typically used in conditional statements...


June 14, 2008  10:19 PM

VBScript Statements: Explanation of the Do Loop Statement



Posted by: Jerry Lees
Conditional statements, do loop, do until, do while, until, VBScript, VBScript Statements, vbscriptstatements, while

The Do ... Loop statement is very useful (like, for ... next and Select ... case) to execute a block of code more than once. However, where it differs from the other two is that the Do ... Loop statement executes the code as long as (while) a condition is true or...


June 4, 2008  2:57 PM

A simple way to read the registry with VBScript



Posted by: Jerry Lees
regread, regread method, VBScript, wscript.shell

On occasion when administering a group of systems you need to preform certain tasks depending on if something is installed or a particular setting is a certain value and the only way to determine if a system needs attention is to look in the registry. So, In this installment we will look at...


May 26, 2008  3:48 PM

VBScript Statements: Explanation of the Option Explicit Statement



Posted by: Jerry Lees
option, option explicit, VBScript, VBScript Statements, vbscriptstatements

In VBScript declaring your variables up front is not required (as stated in this sites explanation of the Dim Statement), however, many programmers choose to declare their variables up front to avoid having to track down misspellings in their code. They go further by adding the Option...


May 24, 2008  3:47 PM

VBScript Statements: Explanation of the Dim Statement



Posted by: Jerry Lees
DIM, DIM Statement, VBScript, VBScript Statements, vbscriptstatements

The DIM statement is used to declare variables prior to being used. To save space in your code, you can declare more than one variable in a single statement by separating each variable with a comma. For example: Dim x Dim x, y, z The Dim...


May 23, 2008  8:00 PM

VBScript Statements: Explanation of the Const Statement



Posted by: Jerry Lees
Const, Const statement, VBScript, VBScript Statements, vbscriptstatements

The Const statement is useful when you want to reference a specific, unchanging, value in your code multiple times without typing it over and over. For example, in order to use the Const Statement to create a reference to the value of pi to 50 decimal places, you use...


May 21, 2008  6:49 PM

VBScript Statements: Explanation of If… Then … Endif



Posted by: Jerry Lees
else, If Then, IF Then Else, Logical File, Then, VBScript, VBScript Statements, vbscriptstatements

The If/Then/Else statement in VBScript is very similar to the Select Case statement, except it only normally allows for 2 possibilities in your condition. ...


May 14, 2008  8:58 PM

Getting disk usage data with the filesystem object and the Excel.Application object in VBScript



Posted by: Jerry Lees
Disk usage, Documentation, Excel.Application, File System Object, FSO, Functions, Scripting.FileSystemObject, system trending, VBScript

In my previous posting, entitled

  Bookmark and Share     0 Comments     RSS Feed     Email a friend


May 9, 2008  5:54 PM

VBScript Statements: Explanation of Select … Case



Posted by: Jerry Lees
Functions, VBScript, VBScript Statements, vbscriptstatements

The Select ... Case VBScript statement is a very powerful way to easily preform specific actions based on a comparison of a variable to a series of cases you specify, plus it allows for the fact that NONE of the cases apply with an optional case else...


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: