October 22, 200421 yr Can someone help convert the statement below into a runonce statement.FOR /f %%f in ('dir/b/s %CDROM%\Hotfixes\Type1\*.exe') DO Start /wait "" "%%f" /z /n /o /qOr should I just put it in a batch file and run the batch
October 22, 200421 yr Well you could compile a AutoIt script to do that fuction...some thing like the below code should do all of it if not the bulk.; Install Type 1 Hot Fixes$search = FileFindFirstFile ( @ScriptDir & "\Type1\*.exe" )If $search <> -1 Then While 1 $exe = FileFindNextFile ( $search ) If @error Then ExitLoop RunWait ( @ScriptDir & "\Type1\" & $exe & " /z /n /o /q" , "" , @SW_HIDE ) Wend FileClose ( $search )EndIf; Install Type 2 Hot Fixes$search = FileFindFirstFile ( @ScriptDir & "\Type2\*.exe" )If $search <> -1 Then While 1 $exe = FileFindNextFile ( $search ) If @error Then ExitLoop RunWait ( @ScriptDir & "\Type2\" & $exe & " /Q:A /R:N" , "" , @SW_HIDE ) Wend FileClose ( $search )EndIfExit
October 22, 200421 yr humm untested but some thing like this should work...and be fairly expandable to include other future hotfix types.Func _HotFix( $dir , $switch ) $search = FileFindFirstFile ( @ScriptDir & $dir & "*.exe" ) If $search <> -1 Then While 1 $fix = FileFindNextFile ( $search ) If @error Then ExitLoop RunWait ( @ScriptDir & $dir & $fix & $switch , "" , @SW_HIDE ) Wend FileClose ( $search ) EndIfEndFunc; HotFix Type 1_HotFix ( "\Type1\" , " /z /n /o /q" ); HotFix Type 2_HotFix ( "\Type2\" , " /Q:A /R:N" )
Create an account or sign in to comment