Windows Service problem

  • Thread starter Thread starter alegon
  • Start date Start date
A

alegon

Hi... I´m making an instaler for the windows service I've recently
develop, my sevice needs a few config files to be located on the same
path of the executable file of the service, when I install the service
in a folder I put all the config files on this folder but the problem
is that when the service starts it cannot load that files because the
System.Environment.CurrentDirectory property points to windows\system32
and not to the instalation folder of the service where the files really
are... how to fix it...???

thank you
 
Is there any compelling reason you want to use public queues? Its far more
efficient and less error prone to use private queues. Offcourse you need to
know the name and location of the private queue upfront.

Ravi
Hi... I´m making an instaler for the windows service I've recently
develop, my sevice needs a few config files to be located on the same
path of the executable file of the service, when I install the service
in a folder I put all the config files on this folder but the problem
is that when the service starts it cannot load that files because the
System.Environment.CurrentDirectory property points to windows\system32
and not to the instalation folder of the service where the files really
are... how to fix it...???

thank you
 
Where did you see any mention of public or private queue's in this posting?

Willy.

| Is there any compelling reason you want to use public queues? Its far more
| efficient and less error prone to use private queues. Offcourse you need
to
| know the name and location of the private queue upfront.
|
| Ravi
| | Hi... I´m making an instaler for the windows service I've recently
| develop, my sevice needs a few config files to be located on the same
| path of the executable file of the service, when I install the service
| in a folder I put all the config files on this folder but the problem
| is that when the service starts it cannot load that files because the
| System.Environment.CurrentDirectory property points to windows\system32
| and not to the instalation folder of the service where the files really
| are... how to fix it...???
|
| thank you
|
|
 
Why are you refering to CurrentDirectory when loading config files? The
CurrentDirectory for a service is always System32.

Willy.

Hi... I´m making an instaler for the windows service I've recently
develop, my sevice needs a few config files to be located on the same
path of the executable file of the service, when I install the service
in a folder I put all the config files on this folder but the problem
is that when the service starts it cannot load that files because the
System.Environment.CurrentDirectory property points to windows\system32
and not to the instalation folder of the service where the files really
are... how to fix it...???

thank you
 
Back
Top