0

I have a python script which basically lauches an Xmlrpc server. I need this script to run always. I have a function that may call for the system to reboot itself. So once the system has rebooted, I need to get the script running again.

How can I add this to the Windows RT startup?

Charles
  • 50,943
  • 13
  • 104
  • 142
Kiran6699
  • 454
  • 3
  • 6
  • 15

2 Answers2

0

There is no way for a Windows Store app to trigger a system reboot, neither can it run a Python script unless you implement a Python interperter inside your app. Windows Store apps run in their own sandbox and have very limited means of communication with the rest of the system.

Damir Arh
  • 17,637
  • 2
  • 45
  • 83
  • In my python code i have os.system("shutdown /r /t 0"). When this command is executed, it wil restart immediately. I just need to somehow launch back my script after the system restarts. – Kiran6699 Jan 21 '13 at 17:23
  • 1
    @kraxter I've read in your answer to Filip that you're asking about Windows RT, not Windows Runtime. AFAIK there is no Python runtime available for Windows RT which makes your question rather rethorical. Only Windows Store apps can be installed on Windows RT which run in a sandbox and don't have access to the operating system to restart it. – Damir Arh Jan 21 '13 at 17:39
0

You can create a scheduled task to run on login or boot. The run registry key and the startup folder do not function on Windows RT, but the task scheduler does.

Off topic (since I seem unable to add a comment to the other answer) there has been a copy of Python ported over to Windows RT using the jailbreak.

  • Hi Nathan, I have tried using the scheduled task but there are some issues I still face. It has a lot to do with the user login etc. I have stopped trying how to get it done for now. And yes, I am running python on Windows RT. I got it from a collegue – Kiran6699 Feb 12 '13 at 13:24