I created an ovpn configuration under windows and I actually wanted it to run a Powershell script after the connection is estabilshed.
The last lines of the ovpn-file are as follows
script-security 3
up test.py
The content of the test.py is very simple and I tried both
a)
#!/usr/bin/env python
print('Hello World')
and b)
#!C:\\Program Files\\Inkscape\\bin\\python.exe
print('Hello World')
I am following the documentation here: https://openvpn.net/vpn-server-resources/explanation-of-client-side-scripting-with-simple-examples/
In all cases I keep getting the following error when executing the config.
2022-05-31 13:58:08 openvpn_execve: CreateProcess test.py failed: Unknown error (errno=193)
2022-05-31 13:58:08 WARNING: Failed running command (--up/--down): external program did not execute -- returned error code -1
2022-05-31 13:58:08 Exiting due to fatal error
Any idea why this keeps happening?