Radimus Posted October 22, 2004 Posted October 22, 2004 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
Nologic Posted October 22, 2004 Posted October 22, 2004 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
Nologic Posted October 22, 2004 Posted October 22, 2004 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" )
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