Link to home
Start Free TrialLog in
Avatar of KodiBear
KodiBear

asked on

Embed music into a script

I am trying to embed a song into a login script.  I already have a picture pop up within a ie window.  Can someone tell me what I need to add to make sound too.  Thanks.
Option Explicit
 
Const cIMG = "<img src='file:\\Tmc0100dc01\SYSVOL\tmc.com\scripts\picture.jpg' border='1'>"
 
Dim oIEA : Set oIEA = CreateObject("InternetExplorer.Application")
With oIEA
  .ToolBar = 0
  .AddressBar =false
  .StatusBar = 0
  .Width = 490
  .Height = 430
  .Left = 0
  .Top = 0
  .MenuBar = false
  .Navigate "about:blank"
  While oIEA.Busy
  Wend
  .Document.Title = "Generic Text!!"
  .Document.Body.InnerHTML = cIMG
  .Visible = 1
End With 
 
WScript.Sleep 30 * 1000
 
On Error Resume Next 
oIEA.Quit
set oIEA = Nothing

Open in new window

Avatar of RobSampson
RobSampson
Flag of Australia image

Hi there....WAV files can be played:
http://www.microsoft.com/technet/scriptcenter/resources/qanda/nov04/hey1103.mspx

and other files could probably be played using WMPlayer, but I don't have any code accessible for that at the moment....

Regards,

Rob.
ASKER CERTIFIED SOLUTION
Avatar of RobSampson
RobSampson
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KodiBear
KodiBear

ASKER

Thank you.  I appreciate the help.
No problem. Thanks for the grade.

Regards,

Rob.