I'll answer all the responses I got at once:
#1 response - Does it have the 'interact with desktop' checkbox on in
the service definition?
#1 answer - No it didn't. I tried that and it didn't work. See below
for output of another test I did.
#2+3 response - Is your PATH set in the system/environment control
panel as a System Variable?
#2+3 answer - Yes. All environment variables are set as System
Variables in Control Panel > System > Advanced > Environment Variables
I ran 3 tests. Using the task, I
loaded up all the environment variables. I ran it three ways.
1. As a service, with the "interact with desktop" option enabled.
2. As a service, logging on as a local Administrator account.
3. In a command prompt.
The following variables get set with all 3 methods:
VCSID
PROMPT (Not set via Control Panel...>Environment Variables)
PROCESSOR_IDENTIFIER
TEMP
JAVA_HOME
ComSpec
USERPROFILE (Not set via Control Panel...>Environment Variables)
windir
TMP
OS
NTRESKIT
ProgramFiles (Not in Control Panel...>Environment Variables)
SMS_LOCAL_DIR
Os2LibPath
PROCESSOR_LEVEL
PROCESSOR_REVISION
COMPUTERNAME (Not in Control Panel...>Environment Variables)
NUMBER_OF_PROCESSORS
PATHEXT
CommonProgramFiles (Not in Control Panel...>Environment Variables)
SystemRoot
SystemDrive (Not in Control Panel...>Environment Variables)
ALLUSERSPROFILE (Not in Control Panel...>Environment Variables)
PROCESSOR_ARCHITECTURE
ANT_HOME
SYSTEM_ROOT
When I run it as a Service, interacting with the desktop, that's all I
get.
When I run it as a Service logging on as a local Administrator, I get
all of the above plus:
USERDOMAIN
USERNAME
When I run it in a Command prompt I get everything in the first list
plus:
USERDOMAIN
USERNAME
HOMEDRIVE
APPDATA
LOGONSERVER
HOMEPATH
PATH
That jog anything?
time to start digging into Execute.java's getProcEnvironment()
method????????
--- Mark Gibson wrote:
>
> >Does anyone know why Ant running under a Service on W2K might not
> have
> >access to all environment variables (specifically Path)?
>
> Are some of your environment variables USER or SYSTEM?
>
> If the relevant ones are USER -
>
> NT Services run against a particular account. By default it's
> something
> like 'LocalSystem'. You can set the login you want the service to
> run
> under. If you set this to the user account you personally use, this
> should
> work. Otherwise, make the relevant environment variables SYSTEM
> vars.
>
> Mark
>
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx
>
>
> --
> To unsubscribe, e-mail:
>
> For additional commands, e-mail:
>
>
__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com
--
To unsubscribe, e-mail:
For additional commands, e-mail: