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 You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/YjBRTW9yMnBBMklK. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
It's actually pretty simple to do, especially for a static file name. If you look at EsImageStartUp, you'll find EsImageStartUp class>>walkbackFileName: for setting the default walkback name.
We've actually extended EsImageStartUp and EsNlsImageStartUp to obtain a base walkback directory from the image .ini file, and to dump walkbacks there with file names built from the user name and time. If you're interested, I can try to liberate that code. Tom -- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/MDdkaGpfU3p0LW9K. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
In reply to this post by Thomas Holzer
What our application has done is to run in the appdata directory, so things like a walkback.log are written there. It works well, with most things (the .exe, .dll, nls, bitmap etc.) under Program Files.
--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/akktZHlReUwycGNK. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
In reply to this post by Thomas Holzer
Perhaps the easier way is to query the environment variable APPDATA or LOCALAPPDATA and you get the path to the directory you are allowed to write to ....
-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/OAkYRCgioNUJ. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
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 You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/uPnG5D1OP08J. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
I think, that no replacement are done in these calls, because a simple
CfsDirectoryDescriptor mkdir: ('APPDATA' abtScanEnv),'\myapppath' works .... -- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/YutHoSiFzDYJ. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
In reply to this post by Thomas Holzer
Thomas, our code doesn't have to figure out APPDATA etc. Instead, our application is installed with the .exe etc. in Program Files, and some other things in APPDATA. Then the Windows shortcut that runs our UI app specifies the "Start in" directory somewhere under APPDATA.
--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/RTRkpotEHmkJ. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
In reply to this post by Marten Feldtmann-2
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 You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/ZTYB7mOhSWoJ. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
In reply to this post by Wayne Johnston
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 You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/vWmi-m02x4AJ. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
Free forum by Nabble | Edit this page |