Jump to content

Sound during install


Recommended Posts

I am installing Office 2007 to our computers here and a colleague of mine asked me if I could play some simple music during the install. I am using the SoundPlay command which works great. The problem that I am having is that not all of the installs are going at the same speed. The slower computers take longer to install so I would like to have another song to be played during the install. I am unable to get the RunWait to work to shutdown the music when the install is done. Here is my script.

TraySetState(2)

SoundPlay("\\UNC-Path1 Mutiny.wma",0)

SoundPlay("\\UNC-Path\13 Betrayal & Desolation.wma",0)

RunWait("\\UNC-PATH\Office-2007\setup.exe")

If I use only one song it works fine. SoundPlay("\\UNC-Path1 Mutiny.wma",1) How can I play another if the time runs long on the install, or loop the song until the RunWait is done?

Link to comment
Share on other sites

create a loop that checks constantly if the process is still their and if the song is still playing than if the song is over play a new song (maybe a random one from a directory) and if the process is gone than exit =]

Edit: In other words don't use runwait

Edited by fear1313

[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Link to comment
Share on other sites

The problem with that is that it will be running msiexec.exe which is usually running in task manager. So I will not be able to do that. Here is my original script that works.

TraySetState(2)

Run("\\UNC-Path\Office-2007\setup.exe")

SoundPlay("\\UNC-Path1 Mutiny.wma",1)

This one will work fine on the powerful computers but ends about 5-9 minutes to soon on the slower ones.

Link to comment
Share on other sites

Hmm... try runnning two scripts?

Have one script filled with SoundPlays and music. Or two parts to one script. I just wrote this, seems to work fine.

#NoTrayIcon
If $CmdLine[0] > 0 And $CmdLine[1] = 'music' Then
    While 1
        SoundPlay('D:\Music\`Misc\Carl Orff - Carmina Burana - O Fortuna.mp3', 1)
        SoundPlay('D:\Music\`Misc\The Who - Baba O''Riley.mp3', 1)
        SoundPlay('D:\Music\`Misc\DeVotchKa - First Push.mp3', 1)
        SoundPlay('D:\Music\`Misc\Massive Attack - Teardrop.mp3', 1)
        SoundPlay('D:\Music\`Misc\Yaz - Situation.mp3', 1)
    WEnd
Else
    If @Compiled Then
        $iMusicPID = Run(@AutoItExe & ' music')
    Else
        $iMusicPID = Run(@AutoItExe & ' ' & FileGetShortName(@ScriptFullPath) & ' music')
    EndIf
    RunWait('notepad')
    ProcessClose($iMusicPID)
EndIf
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...