Newbie question: getting my program to run at startup on Windows

Arjan Dikhoff captain at home.nl
Tue Feb 10 22:52:23 CET 2004


Hello, I'm new to this list.

I'm trying to get my program to run automatically at startup, but so far
no luck. I came as far as:

key = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER,
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run")
                
_winreg.SetValueEx(key, "earthclock", 0, _winreg.REG_SZ, os.getcwdu() +
"\\EarthClock.exe")
_winreg.CloseKey(key)

But I get "WindowsError: [Errno 5] Access is denied"

I'm probably doing something blatantly wrong. Does anyone know what it
is?

Arjan






More information about the Python-list mailing list