May-28-2020, 09:41 PM
(This post was last modified: May-28-2020, 09:42 PM by rangeshgupta.)
Hello,
I am trying to launch the application in RDP session from the background process which is python script. Here background script and RDP session is same user.
I tried win32process.CreateProcess but it runs application in background.
Is there any way I can achieve it.
Thanks
Rangesh
I am trying to launch the application in RDP session from the background process which is python script. Here background script and RDP session is same user.
I tried win32process.CreateProcess but it runs application in background.
si = win32process.STARTUPINFO() si.dwFlags = win32process.STARTF_USESHOWWINDOW si.wShowWindow = win32con.SW_SHOW si.lpDesktop = 'winsta0\default' procHandles = win32process.CreateProcess(None,'notepad',None, None, 0,win32process.CREATE_NEW_CONSOLE, None, None, si)Other option I tried is win32process.CreateProcessAsUser. But for it I need RDP user token by calling function win32ts.WTSQueryUserToken and it required special privilege to get the access token for user RDP session. Which user account doesn't have.
Is there any way I can achieve it.
Thanks
Rangesh