New command cm_SwitchX64Redirection did not all of the job
Moderators: Hacker, petermad, Stefan2, white
New command cm_SwitchX64Redirection did not all of the job
It is OK, switching off WOW64 redirection System32-->SysWOW64.
Dos prompt as well launches 64bit version of cmd.exe from the "real"
System32 folder.
But if one tries to start, say, msconfig.exe from the TC command line
TC can not find msconfig.exe. The same phenomenon is observed
when one tries to start some .cmd or .bat file: it is started with
32bit version of cmd.exe, so can not launch the file msconfig.exe
from the line
%windir%\system32\msconfig.exe
in the .cmd file.
Dos prompt as well launches 64bit version of cmd.exe from the "real"
System32 folder.
But if one tries to start, say, msconfig.exe from the TC command line
TC can not find msconfig.exe. The same phenomenon is observed
when one tries to start some .cmd or .bat file: it is started with
32bit version of cmd.exe, so can not launch the file msconfig.exe
from the line
%windir%\system32\msconfig.exe
in the .cmd file.
- ghisler(Author)
- Site Admin
- Posts: 50507
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
This is intentional. For some functions like launching files, the redirection is turned back on, because they would otherwise not work at all (because of dlls not found etc).
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
If You succeeded in switching off WOW64 redirection
for TC, I can not see the reason why TC is
obliged to switch on this redirection, except for other 32bit progs
(which will die in 64bit world of "real" system32),
for itself as well. After he loads all of his own 32bit dlls
into his own address space.
for TC, I can not see the reason why TC is
obliged to switch on this redirection, except for other 32bit progs
(which will die in 64bit world of "real" system32),
for itself as well. After he loads all of his own 32bit dlls
into his own address space.
- ghisler(Author)
- Site Admin
- Posts: 50507
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I had to add several exceptions because otherwise almost nothing worked with redirection switched off...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
2Vlad0
If you are using windows vista or seven, you can control yourself what command processor should be used to execute your batches (using the sysnative pseudo directory)
Just add an internal association to your windcmd.ini:
After this, you should be able to start the batch with context menu or double click.
If you want to use batches also from the command line, i suggest you to set up an alias "x64" with the command "%windir%\sysnative\cmd.exe /C". Use it as prefix before the batch filename.
The same method, as %COMSPEC% replacement can be used for button too.
(tested with TC7.50pb7 / Windows Seven x64 and x64Disableredirection=0)
HTH
Holger
___________________
Be Careful What You Wish For, It Just Might Come True.
If you are using windows vista or seven, you can control yourself what command processor should be used to execute your batches (using the sysnative pseudo directory)
Just add an internal association to your windcmd.ini:
Code: Select all
[searches]
Windows Command Batches_SearchFor=*.bat *.cmd
Windows Command Batches_SearchIn=
Windows Command Batches_SearchText=
Windows Command Batches_SearchFlags=0|000002000020|||||||||0000|
[Associations]
Filter1=>Windows Command Batches
Filter1_open=%windir%\sysnative\cmd.exe /C "%1" %*
Filter1.icon=%windir%\sysnative\cmd.exe
If you want to use batches also from the command line, i suggest you to set up an alias "x64" with the command "%windir%\sysnative\cmd.exe /C". Use it as prefix before the batch filename.
The same method, as %COMSPEC% replacement can be used for button too.
(tested with TC7.50pb7 / Windows Seven x64 and x64Disableredirection=0)
HTH
Holger
___________________
Be Careful What You Wish For, It Just Might Come True.
Great!!!
I've just copy/pasted the lines to Wincmd.ini and now I am able
1) to start .cmd files launching progs from the real system32;
2) Which is much more important: to launch progs from system 32
(like msconfig) from TC button bar.
As to the possibilyty to start batch files from TC command line --
I very rarely use this possibility, preferring to just click on the batch
file. So this is not that essential.
Thanks a lot! I think Your post must be added to FACs -- I was
surely not the only person encountering these problems.

I've just copy/pasted the lines to Wincmd.ini and now I am able
1) to start .cmd files launching progs from the real system32;
2) Which is much more important: to launch progs from system 32
(like msconfig) from TC button bar.
As to the possibilyty to start batch files from TC command line --
I very rarely use this possibility, preferring to just click on the batch
file. So this is not that essential.
Thanks a lot! I think Your post must be added to FACs -- I was
surely not the only person encountering these problems.
can't launch with double click
Hello to everyone! I used the solution discussed here and now I can launch bats with context menu by clicking with right mouse button. But double click is not working. Please, explain in a little more details about x64 alias or what should I do? Thanks in advance!


Code: Select all
x64




Code: Select all
em_Command64

Command:
Code: Select all
%windir%\sysnative\cmd.exe /C
Code: Select all
%A
Code: Select all
%windir%\sysnative\cmd.exe
Code: Select all
Execute x64 command processor




After this you should be able to use the alias "x64" in the command line: e.g.
HTHDrive:\Path> wrote:x64 NameOfThex64Batch.cmd
Holger
wow thanks
it is really easy to command line now! I wish I could plus your reputation =)
And... mmm what about double click? I have no ideas why it is not working for me though I've added x64Disableredirection=0 to the [Configuration] section in wincmd.ini =((
And... mmm what about double click? I have no ideas why it is not working for me though I've added x64Disableredirection=0 to the [Configuration] section in wincmd.ini =((
Re: wow thanks
If you rename the extension from .bat to .cmd, it should work.atrant wrote:... mmm what about double click?
See also:
so actually this seems to be "by design".ghisler(Author) wrote:Indeed exe, com, bat and lnk files are treated differently than other files: The default verb cannot be overridden via internal associations,...While the former is intentional so the user doesn't accidentally disable programs by defining a *.* internal association,...
Regards
Holger