Welcome Guest, Not a member yet? Register   Sign In
Run .exe file from ci3 in IIS server
#5

I solved !
<link rel="shortcut icon" href="#">
<?php 
//phpinfo();
error_reporting(E_ALL);

$output=null;
$retval=null;
//exec('c:\inetpub\vhosts\programozas.org\cgi-bin\OlszCommandLine.exe TOKENEXCHANGE  C:\TMP\VALASZ.TXT', $output, $retval);
exec('..\cgi-bin\OlszCommandLine.exe TOKENEXCHANGE  C:\TMP\VALASZ.TXT', $output, $retval);
//exec('dir',$output,$retval);
echo "Returned with status $retval and output:\n";
print_r($output);

?>

-Must use IUSER in IIS
Which is a huge lesson for me:
1.I was expecting the exe to physically start, but since this is a server here nothing physical is running!
2. My program was expecting parameters and I did not specify them, the above code will help to highlight this. After giving the parameters also the exe no longer wrote an error message.
3.I saw the run as working by getting an answer.txt t in the c: \ tmp directory that contained the tokenxchage of the online account.
Reply


Messages In This Thread
RE: Run .exe file from ci3 in IIS server - by programozas - 09-24-2021, 01:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB