GlobalProtect Post-VPN Connect script failing due to error 193
9682
Created On 12/22/21 18:29 PM - Last Modified 05/29/25 19:59 PM
Symptom
The following errors present within the PanGPS log file:
Error( 277): 11/29/xx 09:43:29:632 WTSQueryUserToken failed. Error: 5
Error( 318): 11/29/xx 09:43:29:632 RunProcessIntoDifferentSession: failed to SetTokenInformation. Error: 1314
Error( 383): 11/29/xx 09:43:30:600 CreateProcessAsUser failed with value Error: 193
Error(3455): 11/29/xx 09:43:30:600 Failed to open process 0. Error 87
Error(3507): 11/29/xx 09:43:30:600 Failed to launch command. Error 1008.Environment
- GlobalProtect App configured with post-vpn-connect script
- Visual Basics as the scripting method
- Windows Endpoints
Cause
GlobalProtect does not have direct access to execute scripts locally on the endpoint.
Resolution
- When using Visual Basics as the scripting method for the GlobalProtect post-vpn-connect, specify either the "cscript.exe" or "wscript.exe" parameters before the script name.
- If this is not done, GlobalProtect will not have access to the file.
- Here is an example: C:\Users\<User>\Scripts\Logon\cscript.exe <Script-Name>.vbs or C:\Users\<User>\Scripts\Logon\wscript.exe <Script-Name>.vbs
Additional Information
For additional information, Refer: Deploying Scripts Using the Windows Registry.