Jump to content
Excelsior Forums
es3754

NT Service Working Directory *Help*

Recommended Posts

I wrote a NT Service and I'm trying to open a "config.ini" file in the current directory (where I installed the service off of program files)... but it's trying to look in my system32 direcctory for the congif.ini file.

Since there is no way to have an excelsior setup have multiple root so I could tell the installer to install the config.ini to system32... is there a way to run the service from the installed root folder?

Thanks for any help!

Share this post


Link to post
Share on other sites

Hello.

The problem is that NT services are actually started in windows\system32 directory.

The best way to find config file is to define a new property in JetPackII, such as

-Dmy.installation.dir=$(Root)

After that, you can find config file in the directory with the System.getProperty("my.installation.dir")

name.

-AlexM

Share this post


Link to post
Share on other sites

Thanks -- that seemed to work.  By default it has "java.class.path=$(Root);" in JetPackII.... would this variable do it to with: System.getProperty("java.class.path")??

Thanks again

Share this post


Link to post
Share on other sites

×