Who is this VBScript Section Aimed At?
- Windows 2003 / 2000 administrators who wish to write VBScripts.
- Those new to scripting who need examples to get started.
- Script writers who are familiar with other languages and need to transfer to VBScript.
- (Web based VBScripting is not covered here.)
Useful VBScript Knowledge
VBScript conforms to the classic Object programming model. Objects such as Files have properties for example ‘Path’ and ‘Type’. The interesting part is the methods because they are used to manipulate the object, for instance, GetObject, CreateObject and ConnectObject.
It can be hard to pin down VBScript. There are no stand-alone executables, you do not compile VBScript as you would with C++. How does it work, I can hear you asking. Well VBScript works through a host WSH which reads plain scripts, compiles them and runs them. This means what ever is in those scripts is what gets done.
Getting Started – Beginners advice for creating and saving .vbs scripts
What VBScripts can do – Explaining the scope of VBScripts in Windows 2003
Simple Script to Begin – Create computers and start designing your VBScripts
Create Users – Import users from a spreadsheet
Hungarian Variables – Give your variables meaningful names
Option Explicit – Tighten up your scripts by declaring all variables
File System Object (FSO) – Insight into how VBScripts can read and write to files
WScript.Echo – Create useful messages to confirm what your script has achieved
Event Logs – Design a VBScript to query the logs and find interesting Event IDs
Registry – Control settings through making changes to values in registry keys.
LDAP Properties – Knowledge of the LDAP names user properties is essential for creating users.
ADSI Edit – A wonderful tool to investigate LDAP attributes
Version Check esp 98 – Simple check to see that Windows 98 clients can run VBScripts
Code 800 errors – Discover what causes those annoying WSH messages
Error Handling – Design your code with routines to trap and display errors
Troubleshooting Tips – Handy techniques for solving your problems
I like thePermissions Monitor because it enables me to see quickly WHO has permissions to do WHAT. When you launch this tool it analyzes a users effective NTFS permissions for a specific file or folder, takes into account network share access, then displays the results in a nifty desktop dashboard!
Think of all the frustration that this free utility saves when you are troubleshooting authorization problems for users access to a resource. Give this permissions monitor a try – it’s free!