ZTree.com  | ZEN  | About...  

 Index   Back

[Bug] User file changes can be lost   [Zeta]

By: John Gruener     Orlando, Florida  
Date: Jun 03,2022 at 00:46
In Response to: [Bugs] v2.4.203 Fix-Testing Report (Kim Henkel)

> > [Bug] User file changes can be lost
> > https://ztw3.com/forum/forum_entry.php?id=123745
> > Bug: In some cases ZTree attempts to write INI files to the
> > Program Files directory.
> >
> > Test Results: If these files do not yet exist in %AppData%\ZTreeWin,
> > but they do exist in "\Program Files\ZTreeWin," and ZTree is run as
> > Non-Admin, then:
> >
> > ZTW.ZAM: Exiting from a changed menu gets an error that ZTW.ZA$ cannot
> > be written. The changed ZTW.ZAM is not saved anywhere.
> >
> > ZTW.INI: Changes are not written anywhere and are silently being lost.
> >
> > ZTW.HST: Changes are not written anywhere and are silently being lost.

> I'm not seeing any of these problems, with either the 32 or 64 bit version!
> I see all files correctly read from program files and written to
> %appdata%\ZTreeWin.

This is very strange. With the setup described, there is no way I can get these files to be written to %AppData%\ZTreeWin.

Here is my test setup:
- Windows 10, 64-bit, 21H2
- Installed ZTreeWin using the downloaded Release ztw22x64.exe.
- Changed the install directory to "C:\Program Files\ZTreeWin".
- Added my key.
- Replaced all files with those from ZTW24204.ZIP
- Deleted directory %AppData%\ZTreeWin.
- Ran ZTreeWin from the installed shortcut on my Desktop.
- Made an Alt-F10 change, added a new F9 Menu, and created a Treespec history item.
- Quit
- Using a ZTree NOT installed under "C:\Program Files":
- Moved the %AppData%\ZTreeWin\ZTW.INI, ZTW.ZAM and ZTW.HST files to "C:\Program Files\ZTreeWin"
- Deleted directory %AppData%\ZTreeWin.
- Ran ZTreeWin from the installed shortcut on my Desktop.
- Made an Alt-F10 change, added an F9 Menu item, and created a Treespec history item.
- Got the error previously described on ZTW.ZA$
- Quit
- A new %AppData%\ZTreeWin directory was created, but the only file in it was ZTWIN.BAT
- The existing "C:\Program Files\ZTreeWin" ZTW.HST and ZTW.ZAM files were not updated.
- Running it again with the now existing %AppData%\ZTreeWin directory has same result.

Now here's what's REALLY bizarre! The "C:\Program Files\ZTreeWin\ZTW.INI" file was updated! Again, this is with ZTree run as Non-Admin. I couldn't believe it, so I did it again. Even rebooted the computer to be sure it wasn't due to some latent artifact. Same result.

It so happens that, just to be sure I had all the steps correct, this was the second time I ran through this same install and update. But rather than uninstalling the previous version, I had first renamed the previous install to "C:\Program Files\ZTreeWinX".

So just for grins I changed the Desktop shortcut to that directory and ran it. But in that case Alt-F10 config would NOT update ZTW.INI, just as it had not before, and again it was not written to
%AppData%\ZTreeWin.

So thinking it may be some Registry entry pointing to that new directory, I renamed the new install to "C:\Program Files\Zxxx", and changed the shortcut to point to it. Again, ZTW.INI was updated! I changed the old install directory to "C:\Program Files\ZTreeWin" and again the same shortcut to point to it, and the ZTW.INI file was NOT updated.

So for some reason Windows is allowing the identical ZTW_CFG.EXE program permission to update the ZTW.INI file in the new directory, regardless of its name, and not allowing it in the old directory, regardless of its name. I've checked all NTFS permissions for the directories and ZTW_CFG.EXE; they are all identical.

If anyone has a clue as to how or why this could be happening, please share.

In any case, no matter what I do, these three files are never written to %AppData%\ZTreeWin if they exist under "C:\Program Files" but do not yet exist in %AppData%\ZTreeWin. The only file written there is ZTWIN.BAT.

Kim, in case there is some variable not yet accounted for, I will email you a ZIP of my installation directory.

- John

541 views      
 

Messages in this Thread

 
96,637 Postings in 12,231 Threads, 350 registered users, 60 users online (0 registered, 60 guests)
Index | Admin contact |   Forum Time: Mar 28, 2024 - 12:36 pm UTC  |  Hits:62,366,491  (18,888 Today )
RSS Feed