Class 'COM' not found [SOLVED]

Hi
I compiled a program with version 1.5
I recompiled with version 1.6 but I get this error
with class not found!
can not open a shell
can you help me
thanks
Daniele

Could you please provide more information about your project? When does this error happen? Any PHP source code?

this is the code in question:

$runCommand = “%SystemRoot%//system32//ping -n 1 -w 1 $ip”;
$WshShell = new COM(“WScript.Shell”);
$name = $WshShell->exec($runCommand)->StdOut->ReadAll;

$ur = stristr($name, ‘Host di destinazione non raggiungibile’);
$ur1 = stristr($name, ‘Richiesta scaduta’);

the error it gives me is ‘class’ COM not found. Is a php error

The sole change related to PHP is the new version. Please check the changelog to see whether they changed something related to COM: http://www.php.net/ChangeLog-5.php
Maybe an extension?

what is the new version of php???

See http://www.exeoutput.com/news.php:
Switched to the latest PHP version available: 5.3.18.

“COM” is not enabled in this newer version of PHP.
Download PHP from here http://windows.php.net/download/ and find “php_com_dotnet.dll” file in “/ext” subfolder of the archive. Extract that file in “/PHPRuntime/ext” of ExeOutput, then run ExeOutput and enable that extension in “PHP Settings -> PHP Extensions”.

Thank you jdeel.
This is a alternative to exec().

I don’t know how good it is, but this work (not 100%). :slight_smile:

Hello,

I added the extension, but I can’t get any result, this is my code:

$shell = new COM('WScript.Shell');
$shortcut = $shell->createshortcut($link);
$shortcut->targetpath = $file;
$shortcut->save();

Ideas?
I’m using ExeOutput 1.7

Best regards,

Upgrade to ExeOutput 2018.1 and retry.