Irrylyn
asked on
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\W indows\Sta rt 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!!
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\W
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!!
ASKER
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,"VBScri pt"
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>
<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,"VBScri
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>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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!
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!
No problem. Thanks for the grade.
Rob.
Rob.
ASKER
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?