[python-win32] Windows Service and APPDATA for AUTO startup

Tim Roberts timr at probo.com
Wed Jan 7 00:03:26 CET 2009


Jim Vickroy wrote:
> Tim Roberts wrote:
>> Is this a custom account you created?  Does it actually have a profile
>> (C:\Documents and Settings\Custom User\Application Data)?  
>>
> Yes, that folder does exist.  When started manually (with that
> account) the Service works;  the Service fails, as noted above, when
> started automatically after reboot.

Right.  Boot-start services do not get environment variables.  Those
aren't set until session manager runs, which (I believe) doesn't happen
until login.

You might consider creating an HKEY_LOCAL_MACHINE registry entry to hold
the path, then shove the proper value into the registry when the service
is installed.  Installation should happen during a session.  Don't use
HKEY_CURRENT_USER, because that doesn't exist until after login, either.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list