Run EXE software using App in Windows IIS
I hosted my Django app on Windows IIS in Windows Server 2022 Standard
But my application has a feature that opens software (.exe) and run specific user tasks provided in the request of the site.
For example, a user provides some input from my site, and then it processes it with my app by opening software using python code in views.py
script_path = "C:\inetpub\wwwroot\webapp\script\runthescript.py"
subprocess.run(["C:/Program Files/My Soft/Soft.exe", "-runScriptFile", script_path])
MY PROBLEM
When I tested my application locally using python manage.py runserver
it was working due to admin privileges and session 1
access, but the same when I tried after hosting with IIS then everything working except software to start.
WHAT I TRIED:
I tried providing my AppPool Identity as (IIS APPPOOL\webapp) Administrator privileges.
Tried using Task Scheduler, but it works with the background process but not with the GUI app.
ISSUE
When I googled it, I found that it is due to privileges
and session 0
access. IIS has only session 0 isolation
so that it is unable to access GUI.
Your small help, idea or suggestion definitely be helpful for me. :)