On Error Resume Next
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set WshShell = WScript.CreateObject("WScript.Shell")
strDriveHarasty = "Z:"
strDriveMorestaff = "Y:"
WshNetwork.MapNetworkDrive strDriveHarasty, "\\Server5\Share"
ReportErrors "Mapping Drive."
WshNetwork.MapNetworkDrive strDriveMorestaff, "\\Server5\Share"
ReportErrors "Mapping Drive."
WshNetwork.AddWindowsPrinterConnection "\\davidcan\HP Laser Jet 6L"
ReportErrors "Adding Printer."
WshNetwork.SetDefaultPrinter "\\h8\HP Laser Jet 6L"
ReportErrors "Setting Default Printer."
WshShell.RegWrite "HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSaveTimeOut", "209"
ReportErrors "Setting Screen Save SS Timeout Failed."
WshShell.RegWrite "HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSaveActive", "1"
ReportErrors "Setting Screen Save SS Active Failed."
WshShell.RegWrite "HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSaveIsSecure", "1"
ReportErrors "Setting Screen Save IsSecure Failed."
WshShell.RegWrite "HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSave.Exe", "F:\\WINNT\\System32\\ssmarque.scr"
ReportErrors "Setting Screen Save Scrnsave exe Failed."
WshShell.RegWrite "HKEY_CURRENT_USER\Control Panel\Screen Saver.Marquee\BackgroundColor", "0 128 128"
ReportErrors "Setting Screen Save BackgroundColor Failed."
WshShell.RegWrite "HKEY_CURRENT_USER\Control Panel\Screen Saver.Marquee\Font", "Times New Roman"
ReportErrors "Setting Screen Save Font Failed."
WshShell.RegWrite "HKEY_CURRENT_USER\Control Panel\Screen Saver.Marquee\Mode", "1"
ReportErrors "Setting Screen Save Mode Failed."
WshShell.RegWrite "HKEY_CURRENT_USER\Control Panel\Screen Saver.Marquee\Size", "72"
ReportErrors "Setting Screen Save Size Failed."
WshShell.RegWrite "HKEY_CURRENT_USER\Control Panel\Screen Saver.Marquee\TextColor", "192 192 192"
ReportErrors "Setting Screen Save TextColor Failed."
WshShell.RegWrite "HKEY_CURRENT_USER\Control Panel\Screen Saver.Marquee\Attributes", "00001"
ReportErrors "Setting Screen Save Attribute Failed."
WshShell.RegWrite "HKEY_CURRENT_USER\Control Panel\Screen Saver.Marquee\Speed", "8"
ReportErrors "Setting Screen Speed Text Failed."
WshShell.RegWrite "HKEY_CURRENT_USER\Control Panel\Screen Saver.Marquee\Text", "M O R E S T A F F"
ReportErrors "Setting Screen Save Text (Morestaff) Failed."
WshShell.RegWrite "HKEY_CURRENT_USER\Control Panel\Screen Saver.Marquee\Text","H A R A S T Y S"
ReportErrors "Setting Screen Save Text (Harastys) Failed."
Sub ReportErrors(ErrText)
If err.number <> 0 then
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.LogEvent 1, ErrText & " Error code " & err.number & " (" & err.description & ")"
Err.clear
End If
End Sub