I have a built a Windows Service program. It runs fine with one exception.
The service .exe resides in a folder on the server.
When the service is started, it knows the location of that file, and works correctly.
I need to write to a log file, so I set a path. I use. curdrv() and curdir() plus "\data\" to create the path.
So it should come back with F:\MLS12\Data\
However, with the service executing, it uses the following path:
Path: C:\WINDOWS\system32\Data\
How can I detect, within a windows service, the proper path ? If I hardcode the path, it works fine, but I can't do that because installs will be different at various locations.
Thanks.