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 142: Line 142:
* [http://msdn.microsoft.com/en-us/library/aa384249(VS.85).aspx Running 32-bit Applications]
* [http://msdn.microsoft.com/en-us/library/aa384249(VS.85).aspx Running 32-bit Applications]
* [http://msdn.microsoft.com/en-us/library/aa384187(VS.85).aspx File System Redirector]
* [http://msdn.microsoft.com/en-us/library/aa384187(VS.85).aspx File System Redirector]
* [http://support.microsoft.com/?scid=kb%3Ben-us%3B942589&x=12&y=13 A 32-bit application cannot access the system32 folder on a computer that is running a 64-bit version of Windows Server 2003 or of Windows XP]
* [http://support.microsoft.com/kb/942589/en-us A 32-bit application cannot access the system32 folder on a computer that is running a 64-bit version of Windows Server 2003 or of Windows XP]
* [http://support.microsoft.com/kb/896456/en-us Overview of the compatibility considerations for 32-bit programs on 64-bit versions of Windows Server 2003 and Windows XP]
* [http://support.microsoft.com/kb/896456/en-us Overview of the compatibility considerations for 32-bit programs on 64-bit versions of Windows Server 2003 and Windows XP]



Revision as of 22:26, 22 February 2010

Problem

Windows Explorer will list some files and folders in its filepanel. But Total Commander will not list all of these files and folders. Or Total Commander and Explorer report different files sizes for the same files.

This is true, even though you have instructed both Explorer and Total Commander to display hidden and system files and folders, too.


Affected Windows Versions: 64bit

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

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


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 64bit. Total Commander up to the current version at the time of writing this is a 32bit application.

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

As the Microsoft articles explain, Windows 64bit versions will redirect any request of a 32bit programme like e.g. Total Commander to access %windir%\system32 to a folder named %windir\SysWOW64. But the 32bit programme 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 32bit application.

Exceptions From 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 64bit and Windows 2003 64bit:

  • %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.

Solution

Using the Hidden Alias SYSNATIVE

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

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

On the listed Windows versions, there is an invisible alias name SysNative which points to system32. Only 32bit applications can use the alias SysNative. If a 32bit 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 64bit
  • Windows 7 64bit
  • Windows Vista 64bit.

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 64bit DLLs instead of the 32bit 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 64bit
  • Windows 2003 64bit
  • Windows Vista 64bit
  • Windows Server 2008 64bit
  • Windows 7 64bit


Using Symbolic Links

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

If a 32bit 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 64bit
  • Windows 2003 64bit
  • Windows Vista 64bit
  • Windows Server 2008 64bit
  • Windows 7 64bit


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.

Referenced Microsoft Articles



-- 22-Feb-2010 22:25(UTC)



Back to Problems and Incompatibilities