Hello,
Windows applications are not allowed to write in the Program Files directory.
But the Walkback.log is written in the default program directory of the runtime image. As far as I understand, the walkback.log should be written in a subdirectory of the Windows Appdata directory. It can be retrieved with call SHGetFolderPath.
I think it should be the default behavior of VisualAge to write the walkbacks a configurable subdirectory of the Appdata directory.
Maybe someone has solved this and has some code to share?
Regards
Thomas Holzer
Hi together,
thank you very much for your valuable responses.
@Tom: Yes for static files your solution is fine.
@Wayne: Yes, nice workaround! Hmm but I think there is a reason, that program files should be in the directory program files, and the application data in another directory
Unfortunately the Appdata path is different on each Windows (XP/Vista/7 and Server 2003/2008) Version. So it cannot be static hardcoded.
And I do not know how to call sHGetFolderPath: hwndOwner nFolder: nFolder hToken: hToken dwFlags: dwFlags pszPath: pszPath to retrieve the current app data path. Anybody knows how to do this?
@Marten Yes, I tried also calling CfsDirectoryDescriptor mkdir: '%appdata%\myapppath' but this does not to work.I´m getting: EACCES (13) Invalid path or access denied [3] Any clue what is going wrong?
A plain vanilla runtime on Windows 7/Windows Server 2008 does not produce any walkback, due to the file access restriction in the Program Files directory. I´m wondering that not everybody is running in this issue.
Regards
Thomas Holzer
Marten, thank you. That works well for me!
@Instantiations Would be nice if you could create a configurable build in solution for this. Because I think changing the Kernel App is not a good style...
Greetings Thomas
Wayne, thank you, good point. But we can not tell all our customers how to start our app.
Fortunately I found a solution form Martens post.
Greetings Thomas