View Full Version : Opening text file fails after autostartup on windows

17th October 2008, 05:30

I created an application that reads and stores data form/in text files.
I created an installer for windows that adds a key in windows registry (HKLM ... Run).
If I lunch the application from the exe file it works fine. but when the application is loaded on windows startup it can't read and write from/to the text files.
So to make a test I downloaded google maps example from : http://labs.trolltech.com/blogs/2008/07/03/putting-qtwebkit-to-use-with-google-maps/ that reads adresses from a text file and I builded the app on windows and I added to windows registry to run on startup. Result same thing it cannot read from text file when its loaded on windows startup.

Any one has any clue how to fix this ????

17th October 2008, 06:24
Are your environment variables properly set ??
and also what paths are u using in the application ? are they relative to the path of the application directory ?

18th October 2008, 04:52
Thanks for your help, I fixed the problem by using QT function : QCoreApplication::applicationDirPath(). Before that I was using relative path