I have an windows service made in Python. This is working fine. But I need get the file path where my service are installed. I have tried to use these codes bellow:
os.get getcwd()
Returns:
Windows System32 folder
os.path.realpath(__file__)
Returns:
NameError: global name 'file' is not defined
How can I get the file path to my windows service application?