Problem opening MS Office files, if x64DisableRedirection=1

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Problem opening MS Office files, if x64DisableRedirection=1

Post by *Slavic »

Hello!

I noticed this bug in Windows XP x64, when x64DisableRedirection in wincmd.ini is set to "1" (this is a workaround to enable the access to "true" %windir%\system32 directory in x64 systems). The default command (Enter) on MS Office file like *.doc, *.xls causes the error "Error executing program!"

When x64DisableRedirection=0, this bug disappears and MS Word (for example) is started as usual, loading the selected document.

In x64DisableRedirection=1 mode the document can be opened using the context menu (by default the first line shows the document name in bold). After a doc has been opened once, it (and any other *.doc files) becomes available as usual by Enter. This normal behaviour remains until closing TC. I attempted to trace the buggy operation, but with partial success. I only managed to see the last TC Registry/file operations: searching for the .doc association like
"C:\Program Files (x86)\Microsoft Office\Office12\WINWORD.EXE" /n /dde
and searching the msi.dll file across the disk, starting from "true" system32 directory, where the 64-bit dlls are stored, and so on, but not in SysWOW64, where (only) the appropriate 32-bit version of msi.dll exists. But I'm not sure that it's a real cause of this problem.

OS: Windows XP Professional x64 SP2
MS Office 2007 Home and Students

Other files (*.txt, *.jpg, *.mid, *.mp3, *.htm etc) are opened in associated programs without any problems.

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

Post by *ghisler(Author) »

Well, this puts me into a dilemma - I can turn off the redirect option before launching any programs or opening files, but then you couldn't open any files in the unredirected system32 directory! Any suggestions?

I still recommend that you do not use this x64DisableRedirection option, but instead create a hard link to the windows directory and access system32 from there.
Author of Total Commander
https://www.ghisler.com
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Post by *Slavic »

Thanks for understanding this problem!

I suppose that simpliest workaround is to use as the default command the same one that in the context menu, because it works without problems. This behaviour can be switched on by default if x64DisableRedirection=1 is selected, or, if need, by additional option in wincmd.ini. I don't see the possible negative issues of this solution in first approach (it has to be tested, of course).

P.S. (one day later)
By the way, could it be possible to add an option in "Operation", something like "Use the default Explorer command by Enter"? This will help to solve the compatibility problems like in my case. The similar reference to Explorer already exists in Copy/Delete options. Of course, except the files, which TC treates internally by default, like archives.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I'm sorry but that's not a solution. First, the loading of the context menu is terribly slow, and second it often causes crashes due to faulty shell extensions.

What I could to is re-enable redirection temporarily if TC isn't currently in the System32 folder. This way you could at least open files in other folders. What do you think?
Author of Total Commander
https://www.ghisler.com
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Post by *Slavic »

Well, this solution could solve these problems (my one in particular). But I think a careful selection of cases when temporary redirection will be restored is needed. I suggest these ones:

- If we are in the system32 directory (and all subdirs in it), re-enable is not needed, the reason is obvious;

- If we have a direct reference or link to program in system32. For example, I have a Regedit icon on the TC toolbar and wish to run the 64-bit version of Regedit. If I use a link to %windir%\regedit.exe, in standard mode (x64DisableRedirection=0) the 32-bit version is run, but in 64-bit mode (x64DisableRedirection=1) the 64-bit version of Regedit is started. To exclude this ambiguity, I would prefer to point to %windir%\system32\regedt32.exe. Otherwise, link to %windir%\SysWOW64\regedt32.exe remains 32-bit in any mode. The same situation is with Notepad, cmd, ping,... because OS has two versions of all these programs (forcing users to paranoic check of current image type 32/64 in Task Manager, because this info isn't available in program interface at all).

- If there is no direct link or association with a program in system32, we suppose that a program is 32-bit and temporary re-enable redirection.

Could you make a switch in wincmd.ini in next TC RC to enable/disable this solution for test purpose?

===================
Strictly speaking, we don't have to enable redirection for all 64-bit programs, wherever they are located. Otherwise we could get the problems in near future, when 64-bit versions of commonly used programs like MS Office become available. I hope that appropriated system call already exist, but I'm not sure...


P.S. These API functions could help:
Wow64DisableWow64FsRedirection (you probably already use it) and GetBinaryType to check whether application is 32 or 64-bit.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Should be fixed now in RC4, please test!
Author of Total Commander
https://www.ghisler.com
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Post by *Slavic »

Yes, I confirm that main problem with Office files is successfully solved in RC4: calling both the docs and shortcuts to them work now well in any place of disk. Some less serious problems with files in system32, however, aren't solved yet (e.g. shortcuts and manually typed program names in the command line). But they are known and, as I hope, can be eventually fixed as well.

Trivia: Windows XP x64 has a help file %systemroot%\system32\winhelp.hlp, it's a manual for the help engine (help on help). However, this file can't be opened in this location in any way. On one side, this version of Windows doesn't have a 64-bit engine for *.hlp files (Microsoft count this format as obsolete contrary to *.chm). On other side, this file is also inaccessible for 32-bit engine winhlp32.exe, because the directory %systemroot%\system32 is restricted to 32-bit applications: all calls are redirected to SysWOW64. As a result, double-click or Enter on this file both in Explorer or TC causes a message "Cannot find the file".
fbrunsch
Junior Member
Junior Member
Posts: 5
Joined: 2003-11-16, 17:26 UTC
Location: New York, NY

Post by *fbrunsch »

I'm having difficulties that seem similar to what Slavic reports - but with Win XP 32 bit. If I click on a Word or Excel file, it takes forever to start Word or Excel, and the file never loads, and TC hangs. But I can click and drag the file from TC onto Word or Excel icon on desktop and the program starts and loads the file immediately. However, I can click on an Adobe Acrobat file in TC and Acrobat starts immediately and loads the file. Is there something simple I can change in XP about how it handles .doc and .xls files. This problem used to appear occasionally, but would disappear if I rebooted, but now it seems constant.
Fernand Brunschwig
Prof. of physics and science education,
Columbia Teachers College and Empire State College
New York, NY
fbrunschATgmailDOTcom

HERE'S THE ANSWER - good old Ghisler already had posted it! Wow - he's on top of it - a bug in Windows! Sorry I missed this.
http://www.ghisler.ch/board/viewtopic.php?t=24091&start=0&postdays=0&postorder=asc&highlight=
Fernand Brunschwig, Professor
Master of Arts in Teaching Program
Empire State College
State University of New York
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Not clear address---

Post by *Clo »

2fbrunsch

[mod]To fight against spam, I had to make your e-mail address inactive.
Clo, Moderator[/mod]
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
sraisz
Junior Member
Junior Member
Posts: 3
Joined: 2010-01-25, 23:56 UTC

ERror Executing Program for Excel 2007 in Windows 7

Post by *sraisz »

I tried putting the registry entry into Windows 7, but I still get Error executing program" with Excel files but not with Word docs.

Any ideas what I can do?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

You can try to use TC's internal association function (Files menu).
Author of Total Commander
https://www.ghisler.com
sraisz
Junior Member
Junior Member
Posts: 3
Joined: 2010-01-25, 23:56 UTC

Internal Association worked

Post by *sraisz »

Great! It worked. Thank you for this tip. :D
sraisz
Junior Member
Junior Member
Posts: 3
Joined: 2010-01-25, 23:56 UTC

Now not working

Post by *sraisz »

Well, it seemed to work when I first tried ity. BUt now it doesn't work.

I have *.xls open with

"C:\Program Files (x86)\Microsoft Office\Office12\EXCEL.EXE" "%1"

BUt I still get "Error executing program"

TO start with it does not attempt to open it with an open instance of Excel.exe which is already running, but tries to reload Excel.exe from scratch.
Post Reply