<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Tim Roberts wrote:
<blockquote cite="mid:4963CE8E.1030103@probo.com" type="cite">
<pre wrap=""><a class="moz-txt-link-abbreviated" href="mailto:jim.vickroy@noaa.gov">jim.vickroy@noaa.gov</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hello everyone,
*_
Background
_*
1. I've created a Windows Service that looks for its configuration
data in a sub-folder of/ os.environ['APPDATA']/.
2. The Service is configured to automatically start after host reboot.
3. The Service runs successfully when manually started under its
custom (i,e,, not Local System) account.
4. The Service fails with a /*KeyError: ('APPDATA',)*/ exception
when automatically starting after a host reboot.
_*Questions*_
1. Is there some configuration procedure I've overlooked for the
custom account the Service runs under?
</pre>
</blockquote>
<pre wrap=""><!---->
Is this a custom account you created? Does it actually have a profile
(C:\Documents and Settings\Custom User\Application Data)?
</pre>
</blockquote>
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.<br>
<blockquote cite="mid:4963CE8E.1030103@probo.com" type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap=""> 1. Is this use of /os.environ['APPDATA']/ feasible for AUTO-start
Services? If not, what are preferred folders for
application-specific data; my preference is to avoid
/pythonxx\Lib\site-packages\.../
</pre>
</blockquote>
<pre wrap=""><!---->
APPDATA works if the account really does have a profile. If not, one
common place is to use a folder in \Program Files.
</pre>
</blockquote>
<br>
</body>
</html>