In deploying Windows 7 x64 via a ConfigMgr 2007 SP2 task sequence I have a custom script to change the TCP Global Receive Window Auto-Tuning Level. The command that is executed via the script is:
cmd /c netsh interface tcp set global autotuning=highlyrestricted
This unfortunately returned the following error:
Set global command failed on IPv4 The parameter is incorrect
Since ConfigMgr 2007 task sequences execute as a 32-bit process, and by default use 64-bit file redirection, the shell process in use is C:\Windows\SysWOW64\cmd.exe (which is the 32-bit version on a 64-bit client). By setting the option Disable 64-bit file system redirection on the Run Command Line task, the shell process used is C:\Windows\System32\cmd.exe (the 64-bit process). When the same command is executed in this context, it simply returns the expected, "Ok."
See the Windows Core Networking post, Receive Window Auto-Tuning on Vista, for more information about this setting and why you may need to change it in some circumstances.
The attached file includes my custom WSF script for this.