There is a problem with PATH variable for service run under the user
accont. Running 'set PATH' from cmd shows value for PATH being concatinated
from both system environment value and user's one. But JavaServiceWrapper
get's the path only from user's environment.
Logged In: YES
user_id=1724972
Originator: YES
Problem with recursive definitions in PATH variable:
PATH=%PATH%;c:\foo\bar
As the result there is no PATH variable at all
Logged In: YES
user_id=228081
Originator: NO
When run as a service, the Wrapper manually loads the environment from the system registry. If this was not done, it would be necessary to reboot the system before any environment changes would become visible to the service. Most applications require this, but I was trying to go one step further.
The Wrapper works by always loading in the SYSTEM environment, then if a specific account is specified, it will load that variable in over the SYSTEM values. This is correct for everything except the PATH. You are correct that the PATH needs to be appended.
I reworked that code a bit so it also more efficient memory wise. The PATH variable is now special cased so if a PATH is set both in the user and SYSTEM accounts, the user account value will be appended to that of the SYSTEM account.
This will be in the 3.3.0 release.
I also tested out appending to the PATH variable. This is a feature that I make use of in several applications. Did you try this format:
set.PATH=%PATH%;C:\foo\bar
Thanks for pointing this out.
Cheers,
Leif