Week 3 Ilab

Topics: Windows Script Host, Internet Explorer Pages: 3 (367 words) Published: February 20, 2013
Student Name| | Class| | Date| |
VBScript Network Shares Lab Key

' VBScript: NetShareServer.vbs
' Written by: Student Name
' Date: Today's Date
' Class: COMP230
' Professor: Professor Name
' ==============================================
Set fso = CreateObject("Scripting.FileSystemObject")
Set fileServ = GetObject("WinNT://vlab-PC1/LanmanServer,FileService")

'On Error Resume Next
fso.CreateFolder("C:\Public")
fso.CopyFile "C:\Windows\Cursors\w*.*","C:\Public"

WScript.Echo vbCrLf & "Current Network Shares"
For Each sh In fileServ
WScript.Echo sh.name
Next

Set share = fileServ.Create("FileShare", "PublicData")
share.Path = "C:\Public"
share.MaxUserCount = 10
share.SetInfo

WScript.Echo vbCrLf & "New Network Shares"
For Each sh In fileServ
WScript.Echo sh.name
Next

WScript.Echo vbCrLf & "\\vlab-PC1\PublicData Share will be Available for 60 Seconds!!" WScript.Sleep(60000)

fileServ.Delete "FileShare","PublicData"
fso.DeleteFolder "C:\Public",True

WScript.Echo vbCrLf & "End of Program"
In the space provided below, copy and paste your NetShareServer.vbs Program Code:

cscript NetShareServer.vbs
Process started >>>
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

Current Network Shares
Users

New Network Shares
PublicData
Users

\\vlab-PC1\PublicData Share will be Available for 60 Seconds!!

End of Program
<<< Process finished.
In the space provided below, copy and paste the RUN of your NetShareServer.vbs program:

' VBScript: NetShareClient.vbs
' Written by: Student Name
' Date: Today's Date
' Class: COMP230
' Professor: Professor Name
' ==============================================
Set fso = CreateObject("Scripting.FileSystemObject")
Set networkObj = WScript.CreateObject("WScript.Network")

networkObj.MapNetworkDrive "X:","\\vlab-PC1\PublicData"
Set folder = fso.GetFolder("X:\")
Set...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Week 3 Ilab Essay
  • Ilab Week 3 Essay
  • Week 3 iLab Report Essay
  • Week 3 iLab Essay
  • NETW 204 week 3 iLab Essay
  • Essay on Stat 221 week 6 ilab
  • MAT540 Week 3 Homework Essay
  • Essay on Week 3 iLab Report

Become a StudyMode Member

Sign Up - It's Free