How to run executable from PHP website as a specific Windows user?
问题 By default PHP runs under IUSR account. When executed directly: $lastline = exec('D:\\MyProgram.exe', $output, $return_var); It runs, but the program is unable to do it's tasks due to insufficient privileges. My question is: How do I run an executable under a specific Windows account from a PHP website? I've tried: When executed through Sysinternals PsExec: $lastline = exec('D:\\PsExec.exe -u UserName -p Password -accepteula "D:\\MyProgram.exe"', $output, $return_var); MyProgram.exe does not