I suggest to use the asynchronous
PostMessage(...) instead of the synchronous
SendMessage(...) to avoid waiting forever.....
Code:
cmd /c "powershell.exe -Command "(Add-Type '[DllImport(\"user32.dll\")]public static extern int PostMessage(int hWnd,int hMsg,int wParam,int lParam);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,2)""