Carlos, I DO have a correct path. In InitInstance(), this application creates the following registry key in the root of HKEY_LOCAL_MACHINE: "\SYSTEM\CurrentControlSet\Services\EventLog\Application\\" Then, it obtains complete path of its executable(using GetCurrentDirectory()) and then inserts this path under "EventMessageFile" entry in the root of key, specified above. I tried moving this executable in variety of directories, and every time, the correct home path of executable would be displayed in regedit. I am lost.