Getting Started with VBScript
This section is for beginners who are copying and pasting
example scripts.
My sample scripts will work on Windows 2003, Server 2003 and XP. Avoid
other clients like Windows 98 unless you get the
WSH updates
Instructions to create your VBScript
- Navigate to the page where you want to copy the example 'VBScript.
- Copy all the lines inside the blue section of my sample script (Ctrl +
c).
- Open notepad.exe, now paste the script text (Ctrl +V).
- In notepad, go to the File Menu, Save As script.vbs - The .vbs extension is vital,
do not let it save as a .txt file.
- To run the script simply double click your script.vbs (or what ever
you called the file).
Example 1 - A simple script to display your ComputerName
' VBScript to Display your ComputerName
' Created by Guy Thomas Jan 2003
Set WshNetwork = WScript.CreateObject("WScript.Network")
WScript.Echo "You Computer Name = " & WshNetwork.ComputerName
If you are ready to move on then try: -
Creating Computers
|