IIS Permission Issue When Running Batch File from PHP (Yii2)

Hi everyone,
I’m working on a Yii2 module where I need to trigger a .bat file from PHP to deploy some updates. The PHP code uses this command:
$command = “start /B cmd /c "F:\batchfile\dev_frontoffice_deploy.bat"”;
pclose(popen($command, “r”));

This works perfectly when run via CLI, but when I run it from the web (IIS on Windows Server), the script returns success (Deployment started in background.), but nothing actually happens — the batch file doesn’t seem to run, and no changes are made.

After debugging, I suspect it’s a permission issue, specifically with how IIS runs under a different user account (like IUSR, NETWORK SERVICE, or an app pool identity).