Your application is broken, and you need to fix it. I know this, because I dealt with exactly the same issue. Since I don't know what your application does, all I can suggest is to google windows vista/7 application migration issues. However, I would point you toward:
HRESULT hResult = SHGetFolderPath(NULL,
CSIDL_PERSONAL|CSIDL_FLAG_CREATE,
NULL,
0,
szFolderPath);
If you search on the CSIDL flags, you'll learn what you need to do.