I have a Word to PDF converter that works from Commandline so we created a middle-ware program to accept commands via Classic ASP. That worked so we then created the middle-ware program as a Windows service and all was working fine until we moved from our dev server (Windows Server 2012) to our production server (Windows Server 2019). Now that Windows service no longer works and spits out errors about not be able to find or connect to COM.
So I dropped the middle-ware Windows service and tried using PHP to run the Word to PDF converter. But that either complains about not finding a COM or just hangs.
The PDF converter dev recommended testing PHP command using XCOPY, and lo and behold the real problem enfolds... PHP does not have the rights/permissions to use XCOPY or the PDF conversion app, or our middle-ware service. An example of the PHP is...
$answer = shell_exec('xcopy /S /I /Q /Y /F "C:\IN\Word.docx" "C:\OUT\"')
echo $answer;
So there must be a difference in security between Windows Server 2012 and 2019. How to fix that and/or give PHP rights to run apps?
Yes, UAC is disabled and the permissions on the IN and OUT folders are read, write, execute for Everyone.
How do I enable PHP run XCOPY commands on Windows Server 2019?