0

I have a Python script that launches TeamViewer when a condition is met. When I run the script by double-clicking it or edit with IDLE and choose to run everything works. When the condition is met, TeamViewer is launched with GUI.

Task Scheduler: Run a program - C:\Python27\python.exe Add arguments - teamviewer.py Start in - C:\Users\Username\Documents\Scripts

When trying to launch TeamViewer with Task Scheduler it is actually launched, I can see TeamViewer being started when I check Task Manager but there is no GUI.

I tried with os.startfile and with subprocess.Popen with the same result.

Any ideas?

Jaman42
  • 98
  • 7
  • 1
    You need to run the task as the logged-on user that owns the session where you want the interface displayed. Otherwise it runs in session 0, i.e. the services session, which has no GUI. You can add the session column in the Task Manager to confirm that it's running in session 0. – Eryk Sun Sep 18 '15 at 12:05
  • Spot on! I thought I did that even when checking to run if the user isn't logged in and specifying the username and entering the password but that wasn't the case I found out. Thank you for the help! – Jaman42 Sep 19 '15 at 06:43

0 Answers0