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 /q
Or should I just put it in a batch file and run the batch
Page 1 of 1
converting batch command to runonceex
#2
Posted 22 October 2004 - 08:08 AM
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 ) EndIf Exit
#3
Posted 22 October 2004 - 09:01 AM
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 ) EndIf EndFunc ; HotFix Type 1 _HotFix ( "\Type1\" , " /z /n /o /q" ) ; HotFix Type 2 _HotFix ( "\Type2\" , " /Q:A /R:N" )
- ← UNattended Utilities install
- Unattended Windows 2000/XP/2003
- How do i disable Highlight newly installed apps? →
Share this topic:
Page 1 of 1



Help

Back to top








