'**** Logon script ****
On Error Resume Next
sTITLE = "Grunnskóli Grundarfjarðar"
Dim Network
Set Network = CreateObject("WScript.Network")
Set MSIE = CreateObject("InternetExplorer.Application")
Drive = "U:"
Share = "\\pottur.gg.ic\" & Network.UserName & "$"
SetupMSIE
MSIE.Document.Write "<HTML><TITLE>" & sTITLE & _
"</TITLE><BODY bgcolor=#FFFFFF><FONT FACE=Thaoma><CENTER>Halló</CENTER><BR><BR>"
MSIE.Document.Write "<BR><B>Tengist nú skráarsvæði.. </B><BR><BR> "
'**** Welcome script for users ****
If Hour(Now) < 12 Then
MSIE.Document.Write "</B>Góðan daginn " & _
Network.Username & "</B><BR><BR>"
ElseIf Hour(Now) < 18 Then
MSIE.Document.Write "</B>Góðan daginn " & _
Network.Username & "</B><BR><BR>"
Else
MSIE.Document.Write "Gott kvöld " & _
Network.Username & "</B><BR><BR>"
End If
Wscript.Sleep 500
'******************** Checking Connection to Home drive ***********************
MSIE.Document.Write "</B>Tengi " & Drive & " við " & _
Share & " ...</B><BR><BR>"
Network.MapNetworkDrive Drive, Share
Wscript.Sleep 1000
If Err.Number = 0 Then
MSIE.Document.Write "Tenging heppnaðist</B><BR> "
Else
MSIE.Document.Write "<B>Tenging mistókst, eða þegar til staðar<B> " & Drive & " við " & _
Share & "</B><BR>"
End If
Wscript.Sleep 500
'************** Connecting network drives ***************************
MSIE.Document.Write "<BR></B>Tengi sameiginlegu drifin...."
Wscript.Sleep 500
Set WshNetwork = WScript.CreateObject("WScript.Network")
MSIE.Document.Write "<BR></B>Tengi Almenning...."
WshNetwork.MapNetworkDrive "N:", "\\pottur.gg.ic\Almenningur"
MSIE.Document.Write "<BR></B>Tengi Skrifstofu...."
WshNetwork.MapNetworkDrive "K:", "\\pottur.gg.ic\Skrifstofa$"
MSIE.Document.Write "<BR></B>Tengi Skila...."
WshNetwork.MapNetworkDrive "V:", "\\pottur.gg.ic\skila"
MSIE.Document.Write "<BR></B>Tengi ...."
MSIE.Document.Write "<BR></B>Tengi Sérkennsluþjón...."
WshNetwork.MapNetworkDrive "J:", "\\pottur.gg.ic\serkennslutjonn"
'WshNetwork.MapNetworkDrive "W:", "\\pottur.gg.ic\vefur-skoli$"
MSIE.Document.Write "<BR></B>Tengi síðasta drifið...."
WshNetwork.MapNetworkDrive "X:", "\\big-220.gg.ic\BIG"
'******************* Printer installation *************************************
'MSIE.Document.Write "<BR></B>Tengi prentara - Uppi-litur"
'PrinterPath1 = "\\pottur.gg.ic\Uppi-litur"
'WshNetwork.AddWindowsPrinterConnection PrinterPath1
MSIE.Document.Write "<BR></B>Tengi prentara - Ritari-svartur"
PrinterPath2 = "\\pottur.gg.ic\Ritari-svartur"
WshNetwork.AddWindowsPrinterConnection PrinterPath2
MSIE.Document.Write "<BR></B>Tengi prentara - Ritari-litur"
THIS LINE IS THE LAST LINE WINDOWS7 CAN SEE
PrinterPath3 = "\\pottur.gg.ic\Ritari-litur"
WshNetwork.AddWindowsPrinterConnection PrinterPath3
MSIE.Document.Write "<BR></B>Tengi prentara - Tölvuver-litur"
PrinterPath4 = "\\pottur.gg.ic\Tolvuver-litur"
WshNetwork.AddWindowsPrinterConnection PrinterPath4
'PrinterPath5 = "\\pottur.gg.ic\HP3525"
'WshNetwork.AddWindowsPrinterConnection PrinterPath5
MSIE.Document.Write "<BR></B>Set Default prentara... "
WshNetwork.SetDefaultPrinter("\\pottur.gg.ic\Ritari-svartur")
'******************* Texti sem byrtist í Internet Explorer **********************
'Wscript.Sleep 500
'MSIE.Document.Write "<BR><BR></B>Upgrading Trend virusprotection ......"
'WshShell.Run "\\trend\ofcscan\autopcc.exe"
MSIE.Quit
'******************** Undirforrit sem setur upp Internet Explorer. **************
Sub SetupMSIE
MSIE.Navigate"http://mbl.is"
MSIE.ToolBar = False
MSIE.StatusBar = False
MSIE.Resizable = False
Do
Loop While MSIE.Busy
SWidth = MSIE.Document.ParentWindow.Screen.AvailWidth
SHeight = MSIE.Document.ParentWindow.Screen.AvailHeight
MSIE.Width = SWidth/2
MSIE.Height = SHeight/2
MSIE.Left = (SWidth - MSIE.Width)/2
MSIE.Top = (SHeight - MSIE.Height)/2
MSIE.Visible = True
End Sub
|