G'day,
I am using AI 7.6 build 27499
I have a per-machine (installation type) java project for which I have enabled the stream redirection option. The information contained in the output streams is very user-specific, and so I would like to write this data to the APPDATA folder of the current user. To achieve this, I have configured the stream redirection as such:
Out: "%APPDATA%\[Manufacturer]\[ProductName]\output.log"
Err: "%APPDATA%\[Manufacturer]\[ProductName]\error.log"
The problem is that if the "[Manufacturer]\[ProductName]" sub-folders do not exist, the native java launcher does not create them and thus the log files are never created either. Is it possible for the native launcher to create sub-folders if they do not yet exist?
After building and installing my project, if I edit the .ini file and change the stream redirect paths to "%APPDATA%\output.log" and "%APPDATA%\error.log", the log files are then created and populated as expected.
At first, I thought that I could solve this problem by creating the "[Manufacturer]\[ProductName]" sub-folders as part of the install. That approach will work for the user who performed the install, but only for that user. If the machine is shared by several users, and those other users run the app, they will not have any "[Manufacturer]\[ProductName]" sub-folders in their APPDATA folder.
I don't think changing the project "Installation Type" will help either. The installer cannot know all of the users who may run the app, and so it seems the only way to solve this problem is to dynamically create the "[Manufacturer]\[ProductName]" sub-folders as necessary when the app runs.
I understand that the ability to create new folders at run-time may be restricted due to permissions (if the stream redirect path was pointed to a restricted folder), but for my APPDATA situation it should succeed.
Any help you can offer would be greatly appreciated!
thanks much,
-Todd
FOLLOW US
Get the latest news in Application Packaging