On 64-bit Windows versions, some files and folders shown by Windows Explorer are not shown by Total Commander!: Difference between revisions

From TotalcmdWiki
Jump to navigation Jump to search
Line 145: Line 145:
<BR>
<BR>
------<BR> Back to [[FAQ_Problems_and_Incompatibilities|Problems and Incompatibilities]]<BR>
------<BR> Back to [[FAQ_Problems_and_Incompatibilities|Problems and Incompatibilities]]<BR>
------<BR>[[Category:FAQ]] [[category:General information]]<BR>
<BR>[[Category:Frquently Asked Questions]] [[category:General information]]<BR>


[[de:Einige Dateien und Ordner werden vom Windows Explorer aber nicht vom Total Commander angezeigt!]]<BR>
[[de:Einige Dateien und Ordner werden vom Windows Explorer aber nicht vom Total Commander angezeigt!]]<BR>

Revision as of 22:24, 9 March 2010

When using a 64-bit Windows version, Total Commander may show different folder contents for certain folders than Windows Explorer. This page describes why this happens and how it can be solved.

About the problem

Affected Windows versions

You experience this problem on one of the following Windows versions:

  • Windows XP 64-bit
  • Windows 2003 64-bit
  • Windows Vista 64-bit
  • Windows Server 2008 64-bit
  • Windows 7 64-bit


Affected files and folders

This problem affects files and folders which are located inside %windir%\system32 or inside subfolders of %windir%\system32. A file for which this problem is reported frequently is the hosts file, i.e. %windir%\system32\drivers\etc\hosts.

Note:
%windir% is a variable which holds the name of the Windows folder. In most cases, %windir% will be C:\Windows.

What causes this problem?

Your Windows version is 64-bit. Total Commander up to the current version at the time of writing this is a 32-bit application.

Please, find a brief explanation on how 64-bit Windows versions run 32-bit applications here:

As the Microsoft articles explain, Windows 64-bit versions will redirect any request of a 32-bit program like e.g. Total Commander to access %windir%\system32 to a folder named %windir\SysWOW64. But the 32-bit program will believe it actually sees %windir%\system32.

As a matter of fact the folders %windir%\system32 and %windir%\SYSWOW64 do not hold the same sub-folders and the same files.

Keep in mind:
Navigating to %windir% => system32 will trigger the Wow64 folder redirection and actually take you to %windir% => SysWoW64 instead, provided you are using Total Commander or any other 32-bit application.

Exceptions to the redirection rule

A small number of folders will not be redirected to the %windir%\SysWOW64 foldertree:

  • %windir%\system32\catroot
  • %windir%\system32\catroot2
  • %windir%\system32\drivers\etc
  • %windir%\system32\logfiles
  • %windir%\system32\spool

On Windows XP 64-bit and Windows 2003 64-bit:

  • %windir%\system32\driverstore

will not be redirected, either.
This is true only in case that you go to the named subfolders direcly in one step using the complete pathnames.

If you navigate from %windir% to system32, then to catroot e.g., redirection has already occured when you tried to enter system32. Total Commander has been redirected to SysWOW64 instead. So you cannot enter the right catroot folder from there.

Solutions

Using the hidden alias SYSNATIVE

Starting with Vista 64-bit, Microsoft introduced a workaround for the file and folder redirection. This workaround is available to all 32-bit applications running on

  • Windows Server 2008 64-bit
  • Windows 7 64-bit
  • Windows Vista 64-bit
  • Windows 2003 64-bit with Hotfix KB942589 installed
  • Windows XP 64-bit with Hotfix KB942589 installed

On the listed Windows versions, there is an invisible alias name SysNative which points to system32. Only 32-bit applications can use the alias SysNative. If a 32-bit application requests to access %windir%\Sysnative it will not be redirected to SysWOW64 instead, but it will access the real %windir%system32 folder.

Using the alias SysNative is the recommended way of accessing the real system32 folder.
Therefore, Total Commander 7.50 and above will display the invisible alias Sysnative inside %windir% as if it were a normal folder thus making it easy to use this alias.

So in Total Commander you navigate to %windir% => Sysnative. This will take you to the genuine %windir%\system32 folder.
Navigating to %windir% => system32, however, will trigger the Wow64 folder redirection and actually take you to %windir% => SysWoW64.

Using SysNative will work out of the box provided you are using Total Commander v7.50a or higher on

  • Windows Server 2008 64-bit
  • Windows 7 64-bit
  • Windows Vista 64-bit.

Using SysNative will also work provided you are using Total Commander v7.50a or higher on


Using X64DisableRedirection (temporarily)

Starting with the version 7.0, Total Commander offers a configuration parameter X64DisableRedirection. By default, this parameter has got the value 0, i.e. Windows system file and folder redirection is not disabled (=enabled). You can, however, add the parameter X64DisableRedirection=1 to the section [Configuration], thus disabling Windows system file and folder redirection for Total Commander.

Beware:
Doing so permanently, will inevitably lead to problems with plugins which try to load DLLs from the system32 folder and now try to load the 64-bit DLLs instead of the 32-bit DLLs located in SysWOW64.

Therefore, if you wish to or have to disable the Windows system file and folder redirection, do so temporarily only by using the Total Commander internal command cm_SwitchX64Redirection. This internal command has been introduced by Total Commander 7.50.

Disabling/re-enabling the X64 Redirection will work provided you are using Total Commander v7.0 or higher on

  • Windows XP 64-bit
  • Windows 2003 64-bit
  • Windows Vista 64-bit
  • Windows Server 2008 64-bit
  • Windows 7 64-bit


Using symbolic links

Another way of working around the file and folder redirection to which Microsoft subjects any 32-bit application on 64-bit Windows is by using symbolic links.

If a 32-bit application uses a symbolic link which points to %windir%\system32 in order to access the folder %windir%\system32, in this case no redirection to %windir%\SysWow64 will occur.

So users can use e.g. Sysinternals junction and create a symbolic link inside the folder %windir% named e.g. sl_system32 which points to the real system32 folder.

From now on in Total Commander you navigate to %windir% => sl_system32. This will take you to the genuine %windir%\system32 folder.
Navigating to %windir% => system32, however, will trigger the Wow64 folder redirection and actually take you to %windir% => SysWoW64 instead.

Beware:
On Windows versions older than Vista, Explorer will delete the content of the target folder if you try to delete the symbolic link. Total Commander can tell the symbolic link and the target folder apart.

Working around the described problem with the help of symbolic links will work on

  • Windows XP 64-bit
  • Windows 2003 64-bit
  • Windows Vista 64-bit
  • Windows Server 2008 64-bit
  • Windows 7 64-bit


Further reading

Total Commander Forum

This problem has been extensively reported and discussed in the official Total Commander Forum. If you use the forum search button and search for the strings

  • X64DisableRedirection and
  • SysNative and
  • system32\drivers\etc

you should get a list of about 60 different threads, at least half of them in English.
Note:
You will have to perform 3 separate searches, 1 for each search string in order to get the 60 hits, if you use the forum default search option Search for all terms.

Referenced Microsoft articles




Back to Problems and Incompatibilities