simcam68 Posted March 15, 2006 Share Posted March 15, 2006 (edited) Anyone Installed any of the Replay series stuff from Applian? The /S /W switches make it install silently almost all the way, they seem to be common to the SetupFactory installer stuff. At the end it pops a box for finalizing a sound driver install and then after that a IE window pops up too. Not so worried about te IE window, but he continue thing stops it dead in it's tracks.I'd like to try to do it without a Autoit script if possible. But I guess If not I'll have to do that instead. Edited March 26, 2006 by simcam68 Link to comment Share on other sites More sharing options...
simcam68 Posted March 26, 2006 Author Share Posted March 26, 2006 OK, For lack of a way to do it without Autoit, I made this little script to finish the semi-silent install. It works within WIndows, but does not work during the Runonce sequence. I have tried everything I can think of with no luck. I am testing with VMware.Here's what I've got. (it's a little long winded, but the same exact window pops a couple of times and the loop seems to take care of it just fine)I've tried various versions of the Run command in AutoIT with no change in the result so far.;AutoIt v3;ReplayMusic Semi-Silent install Finisher;WinXP SP2$Title = "Applian Installer/Uninstaller"$Title2 = "Replay Music Quick Tour"$Location = FileGetShortName( @ProgramFilesDir & "\ReplayInstall\RMSetup.exe")$Work_dir = FileGetShortName( @ProgramFilesDir & "\ReplayInstall")Run ( $Work_dir & "\RMSetup.exe /S /W" )Sleep ( 4000 )DO ;First popup window - Driver install IF WinExists ( $Title ) Then If Not WinActive( $Title ) Then WinActivate ( $Title ) WinWaitActive ( $Title ) ControlFocus ( $Title , "" , "Button1" ) ControlClick ( $Title , "" , "Button1" ) ;IE popup tour ElseIf ProcessExists ( "iexplore.exe" ) Then ProcessClose ( "iexplore.exe" ) ;IE popup tour ElseIf WinExists ( $Title2 ) Then If Not WinActive( $Title2 ) Then WinActivate ( $Title2 ) WinWaitActive ( $Title2 ) WinClose ( $Title2 ) Else EndIfSleep ( 1000 )$A = WinExists ( $Title )$B = WinExists ( $Title2 )$C = ProcessExists ( "irsetup.exe" )$D = ProcessExists ( "iexplore.exe" )$Total = $A + $B + $C + $D Until $Total = 0Exitand here is how it's called from RunonceREG ADD %KEY%\051 /VE /D "ReplayMusic" /fREG ADD %KEY%\051 /V 1 /D "%PP%\ReplayMusic\ReplayCopy.cmd" /fREG ADD %KEY%\051 /V 2 /D ""%systemdrive%\Program Files\ReplayInstall\ReplayMFnsh.exe"" /fREG ADD %KEY%\051 /V 4 /D "REGEDIT /S %PP%\ReplayMusic\Registration.reg" /fThe Replay copy cmd moves the files to the system drive. That was another attempt to get it to work. IT looks like this. I added the ping to allow for more time incase of a slow copy from a CD drive or what ever else might slow it down.FOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\win51ip.SP2 SET CDROM=%%i:SET PP=%cdrom%\Install\XCopy /Y /E "%PP%\ReplayMusic\ReplayMFnsh.exe" "%systemdrive%\Program Files\ReplayInstall\"XCopy /Y /E "%PP%\ReplayMusic\RMSetup.exe" "%systemdrive%\Program Files\ReplayInstall\"PING 1.1.1.1 -n 1 -w 10000 >NULExitIf you run the Autoit script from a command window while in windows it works exactly how it is suppose to, but during Runonce it copies the files from the ReplayCopy.cmd file and that's it. THe script doesn't seem to run or fails, I'm not sure how to tell. I am about ready to pull my hair out and throw this box out the window... And yes I could just make an Autoit script and do it completely with that, but now it's just the principle of the thing, IT's not going to win, I plan on winning this battle! Anyone got any ideas on this? Link to comment Share on other sites More sharing options...
MHz Posted March 27, 2006 Share Posted March 27, 2006 (edited) Looks like your doing the long way round to just install this program. I trimmed out the unneeded stuff and arranged better to achieve some better result. You should be able to add the registration entries into the AutoIt script also so it is more comsolidated.In RunOnceEx.cmd, it should look like this.FOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\win51ip.SP2 SET CDROM=%%i:SET PP=%cdrom%\Install\REG ADD %KEY%\051 /VE /D "ReplayMusic" /fREG ADD %KEY%\051 /V 1 /D "%PP%\ReplayMusic\_ReplayScript.exe" /fREG ADD %KEY%\051 /V 2 /D "REGEDIT /S %PP%\ReplayMusic\Registration.reg" /fThe _ReplayScript.exe is the compiled AutoIt script.This is the AutoIt script named _ReplayScript.au3;AutoIt v3;ReplayMusic Semi-Silent install Finisher;WinXP SP2$Done = 0$Title = 'Applian Installer/Uninstaller'$Title2 = 'Replay Music Quick Tour'RunWait('"' & @ScriptDir & '\RMSetup.exe" /S /W')ProcessWait('iexplore.exe', 3)Do Select ;IE popup tour Case ProcessExists('iexplore.exe') ProcessClose('iexplore.exe') ;IE popup tour Case WinExists($Title2) WinClose($Title2) ;First popup window - Driver install Case WinExists($Title) ControlClick($Title, '', 'Button1') If Not $Done Then While Not StringInStr(WinGetText($Title), 'Installation Complete') Sleep(500) WEnd $Done = 1 EndIf EndSelect Sleep(500)Until Not ProcessExists('irsetup.exe') And _ Not ProcessExists('installtr.exe') And _ Not ProcessExists('iexplore.exe')ExitNo need to convert to shortnames if you just use quotes as shown in the RunWait line. I used RunWait as the install does complete about the same time the windows show, and makes it reliable. I chose to wait for iexplore.exe with timeout to ensure that it appears before the end of script and will be closed. Then the last window can be processed with ease.Put the compiled script and the installer in ""%PP%\ReplayMusic\"Edit:Updated AutoIt codeAdded variable to disable use of While loop with 2nd Case selection to prevent hang. Edited March 27, 2006 by MHz Link to comment Share on other sites More sharing options...
simcam68 Posted March 27, 2006 Author Share Posted March 27, 2006 This is what I needed! A fresh pair of eyes looking at the problem!Thanks MHz. Here is what I did to eliminate the hang and it worked like a charm. I just eliminated the part after the control click operation for the second title. It loops through the whole Do Until loop again, but it seems to work rather quickly.;AutoIt v3;ReplayMusic Semi-Silent install Finisher;WinXP SP2$Title = 'Applian Installer/Uninstaller'$Title2 = 'Replay Music Quick Tour'RunWait('"' & @ScriptDir & '\RMSetup.exe" /S /W')ProcessWait('iexplore.exe', 3)Do Select ;IE popup tour Case ProcessExists('iexplore.exe') ProcessClose('iexplore.exe') ;IE popup tour Case WinExists($Title2) WinClose($Title2) ;First popup window - Driver install Case WinExists($Title) ControlClick($Title, '', 'Button1') EndSelect Sleep(500)Until Not ProcessExists('irsetup.exe') And _ Not ProcessExists('installtr.exe') And _ Not ProcessExists('iexplore.exe')Exit Link to comment Share on other sites More sharing options...
simcam68 Posted March 28, 2006 Author Share Posted March 28, 2006 Ok, Hit another snag. On one install it popped a 'New Connection Wizard' as a result of the IE window being opened and no Internet connection being setup yet. I added some more code to the above. I'm testing it now. Not sure I like how I have it, but the only other choice is to have it all the way at the end with a long timeout to make sure it catches it if it does popup.;AutoIt v3;ReplayMusic Semi-Silent install Finisher;WinXP SP2$Title = 'Applian Installer/Uninstaller'$Title2 = 'Replay Music Quick Tour'$Title3 = 'New Connection Wizard'RunWait('"' & @ScriptDir & '\RMSetup.exe" /S /W')ProcessWait('iexplore.exe', 3)Do Select ;IE popup tour Case ProcessExists('iexplore.exe') ProcessClose('iexplore.exe') ;IE popup tour Case WinExists($Title2) WinClose($Title2) ;First popup window - Driver install Case WinExists($Title) ControlClick($Title, '', 'Button1') ;New Connection Wizard - Sometimes Occurs Case WinExists ($Title3) ControlClick ($Title3, '' , 'Button4') EndSelect Sleep(500)WinWait ($Title3, '' , 5 )Until Not ProcessExists('irsetup.exe') And _ Not ProcessExists('installtr.exe') And _ Not ProcessExists('iexplore.exe') And _ Not WinExists($Title3)ExitThe wizard took quite a while to show up, It may have already moved on to the next program by the time it did. I didn't time it because I wasn't looking for it when it happened. I guess I'll have to check the timing and then I could make some better judgements on the placement of the code to close it. Link to comment Share on other sites More sharing options...
MHz Posted March 28, 2006 Share Posted March 28, 2006 If you want to just install it and continue, then you could start a second instance to monitor IE and the Wizard. Then you can continue with the other installations that you have.This will work compiled or not compiled. The 2nd instance will run for 5 seconds and monitor.;AutoIt v3;ReplayMusic Semi-Silent install Finisher;WinXP SP2$Pid1 = 'iexplore.exe'$Title1 = 'Applian Installer/Uninstaller'$Title2 = 'Replay Music Quick Tour'$Title3 = 'New Connection Wizard';Start new instance to monitor IE and Wizard when /restart is used by the scriptIf $CMDLINE[0] And $CMDLINE[1] = '/restart' Then ;Only 2 instances of this script allowed If UBound(ProcessList(@ScriptName)) > 3 Then Exit For $i = 1 To 5 ;IE popup tour If ProcessExists($Pid1) Then ProcessClose($Pid1) If WinExists($Title2) Then WinClose($Title2) ;New Connection Wizard - Sometimes Occurs If WinExists($Title3) Then ControlClick ($Title3, '' , 'Button4') Sleep(1000) Next ExitEndIf;Only 1 instance of this script allowedIf UBound(ProcessList(@ScriptName)) > 2 Then ExitRunWait('"' & @ScriptDir & '\RMSetup.exe" /S /W')ProcessWait('installtr.exe', 5)Do ;First popup window - Driver install If WinExists($Title1) Then ControlClick($Title1, '', 'Button1') ;IE popup tour If ProcessExists($Pid1) Then ProcessClose($Pid1) Sleep(1000)Until Not ProcessExists('installtr.exe');Create new instance to monitor IE and WizardIf @Compiled Then Run('"' & @ScriptFullPath & '" /restart')Else Run('"' & @AutoItExe & '" "' & @ScriptFullPath & '" /restart')EndIfExitJust run the script as usual and it should do the rest for you. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now