467,875 Members | 1,470 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,875 developers. It's quick & easy.

Determine a NT service's executable name ?

Hi,

is there a possibility how to determine a services executable file name (and
path) from within the service itself ?

I need to create multiple services of the same application. The app needs to
read a config file, which name depends on the name of the application's
executable itself. So hardcoding it in the registry is no solution ...
--Harald
Jul 18 '05 #1
  • viewed: 4156
Share:
1 Reply
"Harald Schneider" <h_*********@marketmix.com> writes:
Hi,

is there a possibility how to determine a services executable file name (and
path) from within the service itself ?

I need to create multiple services of the same application. The app needs to
read a config file, which name depends on the name of the application's
executable itself. So hardcoding it in the registry is no solution ...


sys.executable (although you should make sure that this returns the
right thing in the py2exe'd file)

win32api.GetModuleFileName(0)

Thomas
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by David Fraser | last post: by
6 posts views Thread by Leonardo Curros | last post: by
reply views Thread by softwareakash | last post: by
28 posts views Thread by Tim Daneliuk | last post: by
5 posts views Thread by dm3281 | last post: by
3 posts views Thread by =?Utf-8?B?Qi4gQ2hlcm5pY2s=?= | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.