I shamelessly reused and modified a UDF posted here to create a change password dialog in IE. I wanted a simple informational window to tell the user where they logged in, but messagebox() wasn't cutting it because sometimes a mystery app would steal focus and cause the box to never time out. So, I stripped out the forms and put what was left in my script. Everything works except a company logo I placed inline. If I run the script locally, it's okay, but when I run it on logon the image doesn't appear. This happens no matter how I address it:
file:///@ldrive\logon-banner.gif
http://our.intra.net/logon-banner.gif
@ldrive\logon-banner.gif
%systemroot%\logon-banner.gif (after copying to local drive)
Is there some sort of security problem I need to address here?
code:
DIM $title, $top, $left, $height, $Width, $False, $true
DIM $status, $doc, $nul, $html
$top = "320"
$left = "200"
$height = "120"
$width = "300"
$false = 0
$true = -1
$title = "Welcome, $fullname."
$msg = "You have logged onto $domain, $site."
$html= '<html>
<head>
<title>$title</title>
<style>
<!--body{ background-color: mediumblue; color: white;font-family: baskerville old face, arial;
font-size:
11pt; margin: 3px }input.tbox { border: lpx black solid;}td { font: 11 pt baskerville old face;
}--->
</style>
</head>
<body scroll=no onresize="window.resizeto(300,120);" >
<img src="file:///@ldrive\logon-banner.gif" height=51 width=166 alt="">
<br>
$msg
</font>
</body>
</html>'
$ie = CreateObject("internetexplorer.application")
; Set properties and display form ...
$ie.addressbar = $false
$ie.menubar = $false
$ie.toolbar = $false
$ie.statusbar = $false
$ie.resizable = $false
$ie.top = $top
$ie.left = $left
$ie.height = $height
$ie.width = $width
$ie.visible = $true
$ie.navigate("about:blank")
; Get a handle to the open document ...
$doc = $ie.document
$doc.write($html)
color w+/b
gosub getparent
gosub sync
gosub home
gosub files
gosub printers
$ie.quit()