Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
    
Thank you for the heads up, much appreciated. –  Matt Chavez Feb 23 '10 at 18:35
add comment

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.

share|improve this answer
    
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. –  Matt Chavez Feb 23 '10 at 15:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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