Script to pop up 2 messages at logon

Good morning Experts!!!

I have two JPEGs that I want to show up one after the other when a user logs in.  Full screen messages in JPEG format.  JPEG#1 pops up for like 3 seconds, then JPEG#2 pops up for like 3 seconds so they have time to read the message.

I'm tryng to figure out how to make this happen.  I think the best way would be to place the JPEGs in a folder on the C: drive and then put a vbs or hta or something in "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Startup\" that will pop up the two JPEG's fullscreen in succession and then go away.

Another option is putting the script into GPO as a logon script to execute from a server share.  Either way... I need a script that will do it.

I appreciate any thoughts on this and if this seems like the best way to execute, I'd love a script to use.

Environment:  Win7 x64 Enterprise on a domain

Thank you!!
IrrylynAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

IrrylynAuthor Commented:
Ok, so I have two .hta files ready.   Each one pops up the JPEG for 5 seconds then closes.

I tried to create a .bat to run 'First.hta' and then run 'Second.hta'.

It only runs 'First.hta'.

How do I get it to run Second.hta once the first one completes?

Tried the following test.bat (and test.cmd):

start mshta.exe "C:\Banner\First.hta"
start mshta.exe "C:\Banner\Second.hta"

Now... if I put a pause in there, it will continue after I press a key to continue:

@echo on
start mshta.exe "C:\Banner\First.hta"
pause
start mshta.exe "C:\Banner\Second.hta"

So why isn't it continuing on it's own when I take the echo and pause out?  Maybe .bat isn't the best way to run them?
0
IrrylynAuthor Commented:
For Reference:  Here is the code for the HTA's.   The only difference is one has "First.jpg" and the other has "Second.jpg"

<html>
<head>
<HTA:APPLICATION ID="IA Banner"
    applicationName="IA Banner"
    version="1"
    BORDER="none"
    BORDERSTYLE="raised"
    CAPTION="no"
    CONTEXTMENU="no"
    ICON="IE7.ico"
    INNERBORDER="no"
    MAXIMIZEBUTTON="no"
    MINIMIZEBUTTON="no"
    NAVIGATABLE="no"
    SCROLL="no"
    SCROLLFLAT="no"
    SELECTION="no"
    SHOWINTASKBAR="yes"
    SINGLEINSTANCE="yes"
    SYSMENU="no"
    WINDOWSTATE="maximize"
>
</head>

<SCRIPT LANGUAGE="VBScript">

    Sub Window_OnLoad
        setTimeout "CloseWindow",9000,"VBScript"
    End Sub

    Sub CloseWindow
      self.close()
    End Sub

</SCRIPT>

<body>
<img src="First.jpg" application=yes width="100%"
height=100% marginwidth=0 marginheight=0
</img>
</body>

</html>
0
RobSampsonCommented:
Hi, my feeling is that you have SINGLEINSTANCE specified in the HTAs, and the batch file isn't waiting for the first to finish before trying to start the second.

To get around this, try using
start /wait "FirstWindow" mshta.exe "C:\Banner\First.hta"
start /wait "SecondWindow" mshta.exe "C:\Banner\Second.hta"

Regards,

Rob.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
IrrylynAuthor Commented:
That works, thank you.

I thought maybe since I had self.close(), the batch file didn't see the first one finish.  But you are correct, I have singleinstance to yes.  Modified my batch and it works as expected.

Thank you, Rob.  You're the best!
0
RobSampsonCommented:
No problem. Thanks for the grade.

Rob.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.