Comp230 Wk6 Lab

Topics: Windows Script Host, IP address, Web server Pages: 4 (947 words) Published: June 23, 2013
Student Name| Baumgart, Eric| Class| COMP230| Date| 12 Jun 13|
VBScript IP File Report

In the space provided below, copy and paste your IP_FileWrite.vbs program sourcecode. If it doesn’t fit, use the next page for the continuation of your program sourcecode. ' VBScript: IP_File_start.vbs

' Written by:
' Date:
' Class: COMP230
' Professor:
' ===================================
' This initializes a 2-dimension array
' of IP Address. The first index +100
' is the room# and the second index+1
' is the computer# in the room.
dim ipAddress(5,3)
ipAddress(0,0)="192.168.10.11"
ipAddress(0,1)="192.168.10.12"
ipAddress(0,2)="192.168.10.13"
ipAddress(0,3)="192.168.10.14"
ipAddress(1,0)="192.168.10.19"
ipAddress(1,1)="192.168.10.20"
ipAddress(1,2)="192.168.10.21"
ipAddress(1,3)="192.168.10.22"
ipAddress(2,0)="192.168.10.27"
ipAddress(2,1)="192.168.10.28"
ipAddress(2,2)="192.168.10.29"
ipAddress(2,3)="192.168.10.30"
ipAddress(3,0)="192.168.10.35"
ipAddress(3,1)="192.168.10.36"
ipAddress(3,2)="192.168.10.37"
ipAddress(3,3)="192.168.10.38"
ipAddress(4,0)="192.168.10.43"
ipAddress(4,1)="192.168.10.44"
ipAddress(4,2)="192.168.10.45"
ipAddress(4,3)="192.168.10.46"
ipAddress(5,0)="192.168.10.51"
ipAddress(5,1)="192.168.10.52"
ipAddress(5,2)="192.168.10.53"
ipAddress(5,3)="192.168.10.54"
fileObj = ipAddrFile
fileStr = ipAddrStr

Const READ=1, Write=2, APPEND=8, ASCII=0
fileName="C:\Scripts\IP_Addresses.csv"
Set fso = CreateObject("Scripting.FileSystemObject")
'If the file identified by fileNameexists, then delete the file. ipAddrStr = ""
If fso.FileExists(fileName) Then
fso.DeleteFile(fileName)
End If
Set ipAddrFile = fso.CreateTextFile(fileName,True)

In the space provided below to copy and paste the remainder of your IP_FileWrite.vbs sourcecode if it did not fit in the first textbox. ' Write Room #, Computer # and IP Addresses to File
For room = 0 to 5
For computer = 0 to 3
ipAddrStr = CStr(room+100) & ","&...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • COMP230 Wk1 Lab Report Essay
  • COMP230 Week 4 Essay
  • Comp230 Wk 5 Lab Essay
  • Comp230 wk4 Ilab Essay
  • Comp230 Week 1 Lab Report Essay
  • Lab report Essay
  • lab 10 Essay
  • Sunscreen Lab Essay

Become a StudyMode Member

Sign Up - It's Free