0

I have used window server, Laravel 5.4

we need to run dll file under my project to encrypt user name and password, I have used given below code as well but it's not working showing some error.

Error is :

Bad extension for file

Failed to create COM object `C:\Windows\Microsoft.NET\assembly\GAC_MSIL\EntraPassUtility\v4.0_1.0.0.2__ecc8607640d67af4\EntraPassUtility.dll': Bad extension for file

// my code here start : 

use \COM ; top of controller 


// this is under my function 
$obj = new COM('C:\Windows\Microsoft.NET\assembly\GAC_MSIL\EntraPassUtility\v4.0_1.0.0.2__ecc8607640d67af4\EntraPassUtility.dll');

// End

please find out the best solution for run DLL file under my Laravel project on window server.

Thanks

Sayed Mohd Ali
  • 2,156
  • 3
  • 12
  • 28

1 Answers1

0

You might be able to use shell_exec() to get what you need (note: IUSR might need permissions to directory that the DLL is in).

$processID = shell_exec("C:\Windows\Microsoft.NET\assembly\GAC_MSIL\EntraPassUtility\v4.0_1.0.0.2__ecc8607640d67af4\EntraPassUtility.dll 2>&1 &");
exec('ps ' . $processID, $processState);
Codemaker2015
  • 12,190
  • 6
  • 97
  • 81