I have a python script that maps a network drive. The problem? It will not start on boot on the Windows XP machines. It's a shortcut placed in the All Users> Startup folder. The shortcut just points to a native .pyw script. Is there something special with Python and Windows as far as the startup folder is concerned? Here is what I have tried.

  1. Startup Folder "All Users"
  2. Starup Folder "Individual User"
  3. Registry settings
  4. Scheduled Tasks

Nothing has worked, all I can think of is converting it to an .exe, but that's not an option considering the script changes constantly and I would have to compile it way to many times. Any advice would be appreciated.


That won't work because the All Users startup folder is a part of the user profile, and so nothing in it gets executed until someone actually logs on. If you want it to run at boot consider a computer startup script in the local group policy (Start | Run | gpedit.msc)

XP won't execute Python directly (unless you have file associations set) so you'll need to call your python interpreter and pass it the full path of your script as a parameter (via a batch file or whatever your preferred approach is).

This will only work with Windows XP Pro

If you have XP Home you are better off asking on SuperUser instead.


My Idea would be to make the script read a config file where you specify the changing options and convert it to an Exe afterwards.

  • Do I need an .exe to even run it at boot for Python? I guess that's the first question, the information is a little sparse out there. Feb 23 '10 at 15:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.