0

I have a scheduled task that runs on my user machines at startup that currently brings up a 'configuring your station' style message in a command prompt window that is replaced by a vbscript msgbox saying that it has completed when it's finished.

I'd like to replace the command window with a small image that is displayed in a window that can't be closed or is displayed floating on the desktop with no frames. The image will have the company logo and the message. Once the task has completed, I'd like it to remove the image when the completed msgbox appears.

When I picture this in my head, it reminds me of the clan screens you get when you load into a Counter Strike Source server.

This is what I have so far:

This brings the splash screen up but you have to Alt+F4 to remove it. Here's the thread I found with this code: Need a VBScript for Open a local Image File by using Command prompt

I don't know how to get it to be closed once the scheduled task completes.
With my current knowledge I'm going to be using autoit to do this. There's probably a better way, though.

<html>
<hta:application id="oHTA"
    border="none"
    caption="no"
    contextmenu="no"
    innerborder="no"
    scroll="no"
    showintaskbar="no"
/>
<script language="VBScript">
    Sub Window_OnLoad
        ' Resize and position the window
        width = 575 : height = 390
        window.resizeTo width, height
        window.moveTo screen.availWidth\2 - width\2, screen.availHeight\2 - height\2

    End Sub
</script>
<body>
<table border=0 width="100%" height="100%">
    <tr>
        <td align="center" valign="middle">
            <img src="image.bmp"/>
        </td>
    </tr>
</table>
</body>
</html>

1 Answer 1

1

Build a VB script with a custom form and no buttons, then just call it where you would display the command window.

5
  • You would want to set BorderStyle or an attribute with a similar name (I can't remember for sure) to None. Jun 14, 2011 at 17:18
  • Yes, you can modify the custom form in such a way as to look like a "splash screen" or to make it appear flat, or consist entirely of a custom image. There is decent flexibility in what you are allowed to do with this. Jun 14, 2011 at 18:53
  • I added what I've done based on this answer, but I'm not 100% there yet. Jun 14, 2011 at 20:14
  • Nevermind! I'm satisfied with what I was able to do using autoit. I was able to close the window at the appropriate time in my script. Thanks! Jun 14, 2011 at 20:21
  • Glad to be of assistance. Jun 14, 2011 at 20:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .