I think I'm getting somewhere. The problem is I am trying to run the netsh command. This requires the cmd.exe window opened with elevated privalages, this is why I had: Send ("{LWin}")
Send ("cmd.exe")
Send ("{CTRLDOWN}{SHIFTDOWN}{ENTER}")
WinWait ("Administrator: C:\Windows\System32\cmd.exe")
Send ("{CTRLUP}{SHIFTUP}")
Send ("cls")
Send ("{ENTER}")
Send ("netsh interface tcp set global autotuning=disabled")
Send ("{ENTER}") However I'm guessing with the stdreadout command you have to write it as you did in your previous post. I have looked here: And I still cannot get cmd.exe to run elevated. I have tried a modification of the code you wrote so it ask's for ID & Psw. Note that I am on a domain, however if asking for local admin ID & Psw I would assume I use the @computername command rather than mydomainnname #include <Constants.au3>
#requireadmin
$username = InputBox("Local Admin ID Required", "Please enter Username")
$pw = InputBox("Local Admin Psw Required", "Please enter Password", "", "*")
Local $foo = RunAs("$username", @ComputerName, "$pw", 2, @ComSpec & " /c netsh interface tcp set global autotuning=disabled", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
Local $line
While 1
$line = $line & StdoutRead($foo)
If @error Then ExitLoop
WEnd
MsgBox(0, "STDOUT read:", $line) The STDOUT Message I'm receiving with the above code is: Set global command failed on IPv4 The parameter is incorrect. This error message indicates that cmd.exe has not run with elevated permission. I'm about to finish work today however I will be back on tomorrow, Thanks again for help!