In an attempt to reproduce Laurent's F8 Junction issue a few days ago (now solved), I ran ZTree without a ZTW.INI file. This turned up some unexpected results. It took a little while to sort out what's happening.
When running ZTree without a ZTW.INI file:
1. Alt-F10 CO-2J shows "none," yet Junctions are not being displayed.
2. When #ZTHome is not under %ProgramFiles% or %ProgramFiles(x86)%, then:
a. If an %AppData%\ZTreeWin directory exists without a ZTW.INI file in it, Alt-F10 F3 saves the ZTW.INI there, rather than in the #ZTHome directory.
b. If a ZTW.INI file exists in %AppData%\ZTreeWin, Alt-F10 shows all the Config Options set in that file, but ZTree ignores all of them, and runs as if no ZTW.INI file exists.
c. If no %AppData%\ZTreeWin directory exists, then a new ZTW.INI file is not created anywhere by Alt-F10 F3 Save.
There are two problems here:
1. The ZTree CO-2J default without a ZTW.INI file is not the same as the default that will be set by the ZTW_CFG.EXE config module. This difference turned up by chance, but there could be other differences, which would require considerable testing to discover.
2. Config module ZTW_CFG.EXE is always saving (or attempting to save) a new ZTW.INI file in %AppData%\ZTreeWin, even when not being run under a %ProgramFiles% directory, and is then reading it from there when it does not exist in the #ZTHome directory. On the other hand, ZTW.EXE is correctly not looking for it in %AppData%\ZTreeWin, so acts as if it doesn't yet exist.
I think the rules should be simple for both. When ZTree is not being run under a %ProgramFiles% directory, neither program should be referencing the %AppData%\ZTreeWin directory for any of their files, even if that directory exists.
Likewise, as reported here: https://ztw3.com/forum/forum_entry.php?id=123745
when installed under %ProgramFiles% they should always use the %AppData%\ZTreeWin directory for ZTW.INI, ZTW.HST and ZTW.ZAM, even if they exist in #ZTHome. They should automatically copy those three files from #ZTHome if they exist there and not yet in %AppData%\ZTreeWin.
- John