how to find INI file path

I made a window service in which i am reading some values from an INI file,for service to be running i have to put the INI in system32 folder,is there any function like through which i can find out the INI file path as because my service also writes some values in INI file and it is not allowed to write in any file that is in system32 folder.
If you give the fully qualified path to the ini-file then it can be wherever to want. It's only when you just give the filename that it assumes the folder.

To get the path to special folders, see SHGetKnownFolderPath (Vista and newer) or its precursor SHGetFolderPath. In addition to the Windows and system32 folders, these function can get the paths to other folders in a local safe way.
Topic archived. No new replies allowed.