cschneegans/unattend-generator

Sync Command Vs. File Execution

ShadowCodeX-debug opened this issue · 1 comments

Would a command be executed faster in an synchronous command or in a file?

There would be no noticeable performance difference between

<RunSynchronousCommand wcm:action="add">
  <Order>...</Order>
  <Path>C:\Foo.exe</Path>
</RunSynchronousCommand>

and

<RunSynchronousCommand wcm:action="add">
  <Order>...</Order>
  <Path>cmd.exe /c "C:\Windows\Setup\Scripts\unattend-01.cmd &gt;&gt;"C:\Windows\Setup\Scripts\unattend-01.log" 2&gt;&amp;1"</Path>
</RunSynchronousCommand>

<File path="C:\Windows\Setup\Scripts\unattend-01.cmd">
C:\Foo.exe
</File>

which both effectively call the C:\Foo.exe file. Custom scripts are stored in <File> elements not for performance reasons, but to make escaping and editing easier and to support longer commands.