I have been playing around with this and I have been looking for a solution but cannot find it ...
I would like to use the "for" command in runonceex. But it won´t work. I cannot even get the command to transer properly to the registry ...
Here are two commands from batch files I would like to use in the runonceex instead:
1.
1. for %%i in (%CDROM%\Setup\Updates\*.exe) do start /wait %%i /passive /norestart /quiet" 2. for %%j in (%CDROM%\SETUP\Firefox\xpi\*.xpi) do start /wait "%PROGRAMFILES%\Mozilla Firefox\firefox.exe" -install-global-extension %%j
So, I tried this in my runonceex:
REG ADD %KEY%\007 /VE /D "Windows XP PostSP2 Updates" /f REG ADD %KEY%\007 /V 1 /D "CMD /C for %%i in (%CDROM%\Setup\Updates\*.exe) do start /wait %%i /passive /norestart /quiet" /f REG ADD %KEY%\009 /VE /D "Mozilla Firefox Extensions" /f REG ADD %KEY%\009 /V 1 /D "CMD /C for %%j in (%CDROM%\SETUP\Firefox\xpi\*.xpi) do start /wait \"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %%j" /f
This gives me the error message: too many arguments (translated from German)
So I tried with %i instead of %%i. This does not give an error message, however, the command for the Windows Updates in they registry key now looks like this:
CMD /C for CDROMi /passive /norestart
I then tried all sorts of things like add a "\" before each bracket etc. but nothing seems to work ....
Mhh ... could need some help here if you have any ideas ...
Thanks,
Alex



Help

Back to top









