• Welcome to Support Forum: Get Support for Patch My PC Products and Services.
 

Intune Script Runner - post install script exit code 403

Started by deephouse88, October 15, 2024, 05:33:09 AM

Previous topic - Next topic

deephouse88

Hi there, can anyone assist with troubleshooting a post-install script for an Intune App? The relevant Script Runner log lines are below:

<![LOG[Running script TVPI.bat]LOG]!><time="11:13:36.186730" date="10-15-2024" component="ScriptRunner" context="" type="1" thread="1" file="">
<![LOG[Running Bat Script. ]LOG]!><time="11:13:36.188731" date="10-15-2024" component="ScriptRunner" context="" type="1" thread="1" file="">
<![LOG[Exiting With code: 403]LOG]!><time="11:13:36.577587" date="10-15-2024" component="ScriptRunner" context="" type="1" thread="1" file="">

If I copy the BAT file locally and run from admin cmd it works perfectly. From the error code I guess its not able to find or open the BAT file, but why not?  Image of the Post Install config for the app is attached.

Raunak Desai (Patch My PC)

Hey Deep,

Thank you for reaching out to support and appologies for the delayed response.

This would need a bit if a detailed troubleshooting. Can you please raise a support case with us:  https://patchmypc.com/technical-support

From one of the affected client machine, please do attach the logs with the support case :

When troubleshooting Intune application installation errors on a client, we will need multiple client logs. Please include the following logs:

%ProgramData%\PatchMyPCIntuneLogs\PatchMyPC-ScriptRunner.log
This may be found in the %ProgramData%\PatchMyPC\ if the Install was initiated by the user from Company Portal.
%ProgramData%\PatchMyPCIntuneLogs\PatchMyPC-SoftwareDetectionScript.log
%ProgramData%\PatchMyPCIntuneLogs\PatchMyPC-SoftwareUpdateDetectionScript.log
%ProgramData%\Microsoft\IntuneManagementExtension\Logs\AgentExecutor*.log
%ProgramData%\Microsoft\IntuneManagementExtension\Logs\IntuneManagementExtension*.log
%ProgramData%\Microsoft\IntuneManagementExtension\Logs\AppWorkload*.log
%ProgramData%\PatchMyPC\PatchMyPC-UserNotification.log
%ProgramData%\PatchMyPC\UISettings\UINotificationSettings.xml
 

If there are any rolled over logs, please include those, too.

Note: Some Patch My PC log files listed above may be found in %WinDir%\CCM folder if that folder exists.

+++++++++++++

Also,

Ensure that the script has the necessary permissions to be executed by the deployment tool or by the system context. Since it works manually from an admin command prompt, it may not have the same permissions when run during the installation.

The error might stem from the execution context. Try running the BAT file under the same context that Intune or the deployment process uses. For example, it may need to be run under the SYSTEM account.

Regards,
Raunak

familyguitar

Quote from: deephouse88 on October 15, 2024, 05:33:09 AMHi there, can anyone assist with troubleshooting a post-install script for an Intune App? The relevant Script Runner log lines are below:

<![LOG[Running script TVPI.bat]LOG]!><time="11:13:36.186730" date="10-15-2024" component="ScriptRunner" context="" type="1" thread="1" file="">
<![LOG[Running Bat Script. ]LOG]!><time="11:13:36.188731" date="10-15-2024" component="ScriptRunner" context="" type="1" thread="1" file="">
<![LOG[Exiting With code: 403]LOG]!><time="11:13:36.577587" date="10-15-2024" component="ScriptRunner" context="" type="1" thread="1" file="">

If I copy the BAT file locally and run from admin cmd it works perfectly. From the error code I guess its not able to find or open the BAT file, but why not?  Image of the Post Install config for the app is attached.

It's great that you updated this. Easier access to bugs and fixes.