[TC 11.51] Virtual folders that are not saved in the directory history on XP/2003

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50703
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.51] Virtual folders that are not saved in the directory history on XP/2003

Post by *ghisler(Author) »

Sorry but it doesn't work that way. I could check whether the folder returns %windir%\fonts, but this wouldn't help when the fonts folder was moved.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 3006
Joined: 2020-01-18, 04:03 UTC

Re: [TC 11.51] Virtual folders that are not saved in the directory history on XP/2003

Post by *Fla$her »

What does it matter if the folder is moved or not, if we are talking about a virtual folder with a GUID?
When you go to the folder with the GUID on XP/2003, you will see only the name (without the path). Don't confuse with cm_OpenFonts.
To get a localized name, you will read the parameter value when open a folder or saving the history (cm_ConfigSaveDirHistory or close/restart):
HKCU\Software\Microsoft\Windows\ShellNoRoam\MUICache\@%WinDir%\system32\SHELL32.dll,-9227
HKCU\Software\Microsoft\Windows\ShellNoRoam\MUICache\@%WinDir%\system32\SHELL32.dll,-22981
HKCU\Software\Microsoft\Windows\ShellNoRoam\MUICache\@%WinDir%\system32\SHELL32.dll,-22982

And if it matches \\<localized folder name>\, you will write the GUID to ini:
=::{450D8FBA-AD25-11D0-98A8-0800361B1103}|\\<localized 'My Documents' folder name>\
=::{D20EA4E1-3957-11d2-A40B-0C5020524152}|\\<localized 'Fonts' folder name>\
=::{D20EA4E1-3957-11D2-A40B-0C5020524153}|\\<localized 'Administrative Tools' folder name>\
Added another problematic GUID for \\Administrative Tools. That is, there are three, not two.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50703
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.51] Virtual folders that are not saved in the directory history on XP/2003

Post by *ghisler(Author) »

Moderator message from: ghisler(Author) » 2025-05-13, 09:23 UTC

Moved to will not be changed
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 3006
Joined: 2020-01-18, 04:03 UTC

Re: [TC 11.51] Virtual folders that are not saved in the directory history on XP/2003

Post by *Fla$her »

Why? What's the reason?
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50703
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.51] Virtual folders that are not saved in the directory history on XP/2003

Post by *ghisler(Author) »

Because there is just no way to save these folders on XP.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 3006
Joined: 2020-01-18, 04:03 UTC

Re: [TC 11.51] Virtual folders that are not saved in the directory history on XP/2003

Post by *Fla$her »

Considering that I've pointed this way, your answer looks dismissive. Why did I waste my time on this post?
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50703
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.51] Virtual folders that are not saved in the directory history on XP/2003

Post by *ghisler(Author) »

Sorry, I do not understand what you mean with that post. I don't have a GUID, I have an item id list. I somehow need to get the GUID from that item id list to be able to save it. I could not find a way to get this on XP.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 3006
Joined: 2020-01-18, 04:03 UTC

Re: [TC 11.51] Virtual folders that are not saved in the directory history on XP/2003

Post by *Fla$her »

I suggested using the names of the current folders as identifiers. They are enough to get the GUID in the way I suggested.
Did you understand this part or not?
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50703
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.51] Virtual folders that are not saved in the directory history on XP/2003

Post by *ghisler(Author) »

No, the names are not sufficient, they can be changed.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 3006
Joined: 2020-01-18, 04:03 UTC

Re: [TC 11.51] Virtual folders that are not saved in the directory history on XP/2003

Post by *Fla$her »

You still don't understand. The names you are reading are the current ones, i.e., those that are returned in the panel header. They are highlighted in green. You need to make bundles of the resulting values of the 3 registry parameters with 3 GUID constants.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50703
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.51] Virtual folders that are not saved in the directory history on XP/2003

Post by *ghisler(Author) »

Sorry but this doesn't help, these are just display names! For example, on my system the administrative folder is called
\\Windows-Tools\
Now when I followed your directions and converted that to a GUID, I would make it impossible to save the location of a Windows server named "Windows-Tools", because the name is indistinguishable. That's why I have to get the GUID from the item id list and not from the display name.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 3006
Joined: 2020-01-18, 04:03 UTC

Re: [TC 11.51] Virtual folders that are not saved in the directory history on XP/2003

Post by *Fla$her »

I don't know what you're talking about. What does the names display?
When you run this script using the button in the 3 listed virtual folders (+ 3 subdirs for Documents), what does the message display?

Code: Select all

; AHK v1.1

Global MUICache, ShellDirs := "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"

If A_OSVersion in WIN_2000,WIN_2003,WIN_XP
  MUICache = HKCU\Software\Microsoft\Windows\ShellNoRoam\MuiCache
Else
  MUICache = HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache

MsgBox % GetGUIDAndDirName()

GetGUIDAndDirName() {
   SendMessage, 1074, 1000, 0,, A
   SendMessage, 1074, ErrorLevel+8, 0,, A
   WinGetTitle, ActivePanelTitle, "ahk_id %ErrorLevel%"
   RegExMatch(ActivePanelTitle, "^\\\\([^\\].+\\)?\K([^\\]+)(?=\\[^\\](|.*)?$)", Name)
   If Name =
   {
      MsgBox The path does not match the syntax!
      Exit
   }

   RegRead, Documents, HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{450D8FBA-AD25-11D0-98A8-0800361B1103}
   RegRead, Pictures, %ShellDirs%, My Pictures
   RegRead, Music, %ShellDirs%, My Music
   RegRead, Video, %ShellDirs%, My Video
   RegRead, AdminTools, %MUICache%, @%WinDir%\system32\SHELL32.dll`,-22982
   RegRead, Fonts, %MUICache%, @%WinDir%\system32\SHELL32.dll`,-22981
   RegExMatch(Pictures, "[^\\]+$", Pictures)
   RegExMatch(Video, "[^\\]+$", Video)
   RegExMatch(Music, "[^\\]+$", Music)

   Switch Name {
   Case Documents:
      GUID = {450D8FBA-AD25-11D0-98A8-0800361B1103}
   Case Pictures,Music,Video:
      GUID = {450D8FBA-AD25-11D0-98A8-0800361B1103}\%Name%
   Case AdminTools:
      GUID = {D20EA4E1-3957-11D2-A40B-0C5020524153}
   Case Fonts:
      GUID = {D20EA4E1-3957-11D2-A40B-0C5020524152}
   Default:
      Exit
   }
   IniValue = ::%GUID%|\\%Name%\
   Return % IniValue
}
Overquoting is evil! 👎
Fla$her
Power Member
Power Member
Posts: 3006
Joined: 2020-01-18, 04:03 UTC

Re: [TC 11.51] Virtual folders that are not saved in the directory history on XP/2003

Post by *Fla$her »

2ghisler(Author)
Can you report the results?
Overquoting is evil! 👎
Fla$her
Power Member
Power Member
Posts: 3006
Joined: 2020-01-18, 04:03 UTC

Re: [TC 11.51] Virtual folders that are not saved in the directory history on XP/2003

Post by *Fla$her »

2ghisler(Author)
I'm still waiting for the test from you. Please don't make me create a new topic. )
Overquoting is evil! 👎
Post Reply