CODE: [Copy to clipboard]
If WScript.Arguments.Named.Exists("auto") Then InstallThis() Else Main()
Sub Main()
Dim ie
Set ie=CreateObject("InternetExplorer.Application")
ie.NaviGate "demo.zarafa.com"
While (ie.Busy)
Wscript.Sleep 200
Wend
ie.Document.All.username.Value="demo2"
ie.Document.All.password.Value="demo2"
ie.Document.All.language.Value="en_US.UTF-8"
ie.Document.All.submitbutton.Click
ie.FullScreen = 1
ie.Visible = 1
End Sub
Sub InstallThis()
On Error Resume Next
Dim WShell
Set WShell = CreateObject("WScript.Shell")
stringname = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\"
OldShell = WShell.RegRead(stringname & "Shell")
BakShell = WShell.RegRead(stringname & "BakShell")
If BakShell = "" Then
WShell.RegWrite stringname & "BakShell" , OldShell
WShell.RegWrite stringname & "Shell" , "WScript.exe " & WScript.ScriptFullName
Else
WShell.RegWrite stringname & "Shell" , BakShell
WShell.RegDelete stringname & "BakShell"
End If
End Sub