With all this discussion using KIX, IE, and OLE, I thought that I'd update the 'standard' logon script that everyone seems to have used from the KIX installation.

I even kept the beautiful green, yellow, and blue color scheme.

I will need help from some HTML experts, however.

In the Message Center box, I need to be able to update the text in a table cell. How can I do that without having to reload the whole page?

If someone can show me how to do that, then we can add the ever important progress bar to the screen as well!

Enjoy!

code:

break on


$false = 0
$true = -1
$WindowTop = 100
$WindowLeft = 100
$WindowWidth = 600
$WindowHeight = 460
$BackGround = "http://www.free-clip-art.net/backgrounds/background44_S.gif"

$NoHServerMsg = "Your group setup is incorrect. Please call the Help Desk"
$NoHServerTitle = "Logon Error!"

$Company = "Acme Corp."
$UserName = @USERID
$FullName = @FullName
$Priv = @Priv
$Wksta = @Wksta
$Domain = @Domain
$LServer = @LServer
$HServer = $LServer

GOSUB GetHServer

$StatusMessage = "Running Logon Script"

$ie = olecreateobject("internetexplorer.application")
if $ie = 0 exit endif


; Set properties and display form ...


$nul = oleputproperty($ie, "addressbar","s","$false")
$nul = oleputproperty($ie, "menubar", "s", "$false")
$nul = oleputproperty($ie, "toolbar", "s", "$false")
$nul = oleputproperty($ie, "statusbar", "s", "$false")
$nul = oleputproperty($ie, "resizable", "s", "$false")
$nul = oleputproperty($ie, "top", "s", "$WindowTop")
$nul = oleputproperty($ie, "left", "s", "$WindowLeft")
$nul = oleputproperty($ie, "height", "s", "$WindowHeight")
$nul = oleputproperty($ie, "width", "s", "$WindowWidth")
$nul = olecallfunc($ie, "navigate", "s", "about:blank")

while olegetproperty($ie, "busy") <> "0" and @error = 0 loop


; Get a handle to the open document ...


$doc = val("&" + olegetproperty($ie, "document"))


gosub htmllogon


$nul = olecallfunc($doc, "write", "s", "$html")


$nul = oleputproperty($ie, "visible", "s", "$true")

sleep 5

;ENTER YOUR NETWORK COMMANDS HERE

;Object cleanup

$nul = olecallfunc ( $doc, "close" )
$nul = olereleaseobject ( $doc )
$nul = olecallfunc ( $ie, "quit" )
$nul = olereleaseobject ( $ie )

EXIT

; --------------------------------------------------------------------
; Logon Script Subroutines
; Do not modify any lines below this!!!

;----------
:htmllogon
;----------


$html = '
<html>

<head>
<title>Welcome to the $Company Network</title>
</head>

<body background="$BackGround" bgcolor="#0000FF">
<div align="center"><center>

<table border="5" width="400" bgcolor="#000000"
bordercolor="#008000" bordercolordark="#008080"
bordercolorlight="#00FF00">
<tr>
<td><p align="center"><font color="#FFFFFF" size="4"><strong>Welcome
to the $Company Network</strong></font></p>
</td>
</tr>
</table>
</center></div>

<p> </p>
<div align="center"><center>

<table border="5" width="400" bgcolor="#000000"
bordercolor="#008000" bordercolordark="#008080"
bordercolorlight="#00FF00">
<tr>
<td><p align="left"><font color="#FFFFFF">User ID:</font></p>
</td>
<td><p align="left"><font color="#FFFF00"><strong>$UserName</strong></font></p>
</td>
</tr>
<tr>
<td><p align="left"><font color="#FFFFFF">Full Name:</font></p>
</td>
<td><font color="#FFFF00"><strong>$FullName</strong></font></td>
</tr>
<tr>
<td><font color="#FFFFFF">Privilege:</font></td>
<td><font color="#FFFF00"><strong>$Priv</strong></font></td>
</tr>
<tr>
<td><font color="#FFFFFF">Workstation:</font></td>
<td><font color="#FFFF00"><strong>$Wksta</strong></font></td>
</tr>
<tr>
<td><font color="#FFFFFF">Domain:</font></td>
<td><font color="#FFFF00"><strong>$Domain</strong></font></td>
</tr>
<tr>
<td><font color="#FFFFFF">Logon Server:</font></td>
<td><font color="#FFFF00"><strong>$LServer</strong></font></td>
</tr>
<tr>
<td><font color="#FFFFFF">Home Server:</font></td>
<td><font color="#FFFF00"><strong>$HServer</strong></font></td>
</tr>
</table>
</center></div>

<p> </p>
<div align="center"><center>

<table border="5" width="400" bgcolor="#000000"
bordercolor="#008000" bordercolordark="#008080"
bordercolorlight="#00FF00">
<tr>
<td><font color="#FFFFFF"><strong>Message Center (100% Complete)</strong></font></td>
</tr>
<tr>
<td><font color="#FFFF00">$StatusMessage</font></td>
</tr>
</table>
</center></div>
</body>
</html>
'
return

;----------
:GetHServer
;----------
$s = instr(@COMMENT,"(")
$e = instr(@COMMENT,")")
$l = ($e - $s) - 1
if $s = 0
$HServer = $LServer
$Nul = MessageBox("$NoHServerMsg","$NoHServerTitle",16)
else
if $e > 0
$HSERVER = substr(@COMMENT,$s+1,$l)
else
goto nohome
endif
endif
return


Roneil