The VBScript Network and Systems Administrator's Cafe:

VBScript


December 2, 2008  12:55 AM

Very simple encryption example with VBScript



Posted by: Jerry Lees
3des, decrypt, decrytption, encrypt, encryption, mid, Reverse Strings, RSA, string, String manipulation, StrReverse, Toolkit, VBScript

I previously mentioned a routine that I wrote to encrypt a string. Now, before the security folks look at the code... understand this: This is intended only to obscure a string from a casual prying eye. It is NOT intended to be a replacement for true encryption like 3DES and...

November 28, 2008  5:07 PM

Reversing a String with VBScript… the easy way!



Posted by: Jerry Lees
Reverse Strings, String manipulation, StrReverse, VBScript

In a previous post, entitled Reversing a string with VBScript using the mid function, I shared a piece of code with you that reversed a...


November 26, 2008  2:43 PM

Reversing a string with VBScript using the mid function



Posted by: Jerry Lees
mid, String manipulation, VBScript

As a part of the VBScript encryption I mentioned working on I needed to find a way to reverse a string. Doing this yielded many possibilities, but this piece of code seemed to work the best (and was the simplest) out of all the pieces of code I came up with to reverse a string. It's simple, but...


November 21, 2008  7:50 PM

Encryption and Decryption with VBScript



Posted by: Jerry Lees
decrytption, encryption, VBScript

I've always been somewhat interested in encryption, but never been terribly good at understanding the math behind it and couldn't find any example code for doing encryption and decryption with VBScript... so I thought I'd write something that would atleast shield characters in a...


November 10, 2008  4:01 AM

Getting the date and time from a remote system via WMI and the WIN32_LocalTime class



Posted by: Jerry Lees
date, systems management, VBScript, win32_localtime

Recently, after the time change I had to log into around 30 to 40 servers to check that the date was correct. This was a real pain, since it required me to actually log onto the server via terminal services and run a command prompt to issue a date command. Unfortunately, I didn't have a script...


November 5, 2008  4:10 PM

Clean up your toys when your done: Fighting memory leaks in your scripts



Posted by: Jerry Lees
memory leaks, tips and tricks, VBScript, working with objects

One on the things you always want to do when you create objects in your scripts, especially objects from third party companies is, is to always remember to destroy the objects when you are done with them. At the very least, before you exit the script. Object creation and not destroy the objects...


October 30, 2008  12:00 AM

A new found bug in VBScript that causes if then statements to return wrong comparisons (or is it?)



Posted by: Jerry Lees
Integer, string, Variable Types, variant, VBScript, working with variables

In the past I've cautioned you on always initializing your variables and encouraged you to always declare your variable types, rather than using the default variant type in VBScript. I'll be the first to admit I don't follow my own advice in my examples! However, variants can be...


October 24, 2008  12:30 AM

Using Environment variables inside a VBScript script



Posted by: Jerry Lees
Environment Variables, VBScript, wscript, wscript.shell

As an extension of the theme I've been blogging about lately of "interfacing with other types of applications" in VBScript, I'd like to share with you a snippet of VBScript code that will allow you to read environment variables from your system. This will allow you to determine a great deal of...


October 23, 2008  1:43 PM

A simple way to gather keyboard input from with in a VBScript



Posted by: Jerry Lees
Input, inputbox, User Input, VBScript

While entering data at the command line for a script to use is sometimes helpful like we discussed in  

  Bookmark and Share     0 Comments     RSS Feed     Email a friend


October 17, 2008  11:11 PM

Communicating error levels to a calling application from with in VBScript



Posted by: Jerry Lees
batch commands, Error control, errorlevel, exit, on error, VBScript, wscript, WScript.quit

We've discussed error handling previously (via the On Error Goto 0 command) in a entry titled, Using error control in a VBScript to recover from...

Bookmark and Share     2 Comments     RSS Feed     Email a friend


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: