echo class Program{static void Main(){System.Windows.Forms.SendKeys.SendWait("{F11}");}}>temp.cs
FOR /F %%i IN ('dir /b /s %WINDIR%\Microsoft.NET\Framework\csc.exe') DO set cscexe=%%i
%cscexe% temp.cs
temp.exe