Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

New command cm_SwitchX64Redirection did not all of the job

 
Post new topic   Reply to topic    Total Commander Forum Index -> TC7.55 Behaviour which will not be changed Printable version
View previous topic :: View next topic  
Author Message
Vlad0
Junior Member
Junior Member


Joined: 15 Jul 2009
Posts: 9

PostPosted: Wed Jul 15, 2009 10:54 am    Post subject: New command cm_SwitchX64Redirection did not all of the job Reply with quote

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.
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 17827
Location: Switzerland

PostPosted: Thu Jul 16, 2009 7:31 am    Post subject: Reply with quote

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
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Vlad0
Junior Member
Junior Member


Joined: 15 Jul 2009
Posts: 9

PostPosted: Thu Jul 16, 2009 12:57 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 17827
Location: Switzerland

PostPosted: Thu Jul 16, 2009 1:33 pm    Post subject: Reply with quote

I had to add several exceptions because otherwise almost nothing worked with redirection switched off...
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
HolgerK
Power Member
Power Member


Joined: 26 Jan 2006
Posts: 2204
Location: Europe, Aachen

PostPosted: Thu Jul 16, 2009 2:17 pm    Post subject: Reply with quote

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:
Code:
[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


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.
Back to top
View user's profile Send private message Send e-mail
Vlad0
Junior Member
Junior Member


Joined: 15 Jul 2009
Posts: 9

PostPosted: Fri Jul 17, 2009 1:14 pm    Post subject: Reply with quote

Great!!! Very Happy
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.
Back to top
View user's profile Send private message
atrant
Junior Member
Junior Member


Joined: 02 Feb 2010
Posts: 3

PostPosted: Tue Feb 02, 2010 4:39 pm    Post subject: can't launch with double click Reply with quote

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!
Back to top
View user's profile Send private message
HolgerK
Power Member
Power Member


Joined: 26 Jan 2006
Posts: 2204
Location: Europe, Aachen

PostPosted: Tue Feb 02, 2010 6:50 pm    Post subject: Reply with quote

Arrow Configuration -> Options... :: last section "Misc"

Arrow Select "(o) alias" and enter
Code:
x64


Arrow Open the "Command Browser" ( [Magnifier Button] )

Arrow Last section "Usercmd.ini"

Arrow Button [New]

Arrow Enter the name of the new command
Code:
em_Command64

Arrow "Change user command" dialog
Command:
Code:
%windir%\sysnative\cmd.exe /C
Parameter:
Code:
%A
Icon file:
Code:
%windir%\sysnative\cmd.exe

ToolTip:
Code:
Execute x64 command processor

Arrow [Ok] to close the "Change user command" dialog

Arrow [Ok] to close the "Command Browser"

Arrow [v] green check button right to the magnifier button to apply the new alias "x64"

Arrow [Ok] to close the Configuration dialog.

After this you should be able to use the alias "x64" in the command line: e.g.
Drive:\Path> wrote:
x64 NameOfThex64Batch.cmd


HTH
Holger
Back to top
View user's profile Send private message Send e-mail
atrant
Junior Member
Junior Member


Joined: 02 Feb 2010
Posts: 3

PostPosted: Wed Feb 03, 2010 2:03 pm    Post subject: wow thanks Reply with quote

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 =((
Back to top
View user's profile Send private message
HolgerK
Power Member
Power Member


Joined: 26 Jan 2006
Posts: 2204
Location: Europe, Aachen

PostPosted: Wed Feb 03, 2010 5:42 pm    Post subject: Re: wow thanks Reply with quote

atrant wrote:
... mmm what about double click?

If you rename the extension from .bat to .cmd, it should work.

See also:
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,...

so actually this seems to be "by design".

Regards
Holger
Back to top
View user's profile Send private message Send e-mail
atrant
Junior Member
Junior Member


Joined: 02 Feb 2010
Posts: 3

PostPosted: Thu Feb 04, 2010 12:02 am    Post subject: Reply with quote

Your advice helped me so much! It works for me now! Thanks a lot =)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> TC7.55 Behaviour which will not be changed All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group