Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

problems with running 32-bit tclsh on Windows x64

15 views
Skip to first unread message

rpr...@yahoo.com

unread,
Apr 4, 2007, 11:06:36 AM4/4/07
to
Hi!

On a MS Windows XP Pro. x64 (64-bit) Edition I installed ActiveState
ActiveTcl 8.4.14.0 (the 32-bit x86 distribution that is available as a
free download).

I noticed problems with invoking some system tools from the Tcl
scripts (which run in a 32-bit tclsh process). The problems are caused
by the way the WOW64 subsystem works in Windows x64. Namely,
the "%SystemRoot%\system32" directory is used for 64-bit DLLs and
EXEs, while
the "%SystemRoot%\SysWOW64" directory is used for 32-bit DLLs and
EXEs.
Some of the system files are present in both directories, i.e. they
have
64-bit and 32-bit versions, but some have only 64-bit version.

When executing 32-bit applications, the WOW64 subsystem makes files in
%SystemRoot%\system32 inaccessible to the application. The
application sees %SystemRoot%\sysWOW64 as %SystemRoot%\system32.

For example it is not possible to invoke ntbackup.exe from a Tcl
script as there is only 64-bit version of ntbackup.exe (in
%SystemRoot%\system32).

Is there a workaround for this problem besides copying the
inaccessible files from %SystemRoot%\system32 to another directory
that is accessible to 32-bit applications?

I hope some day the 64-bit binary distributions of the ActiveTcl
package will be available as a free download.

-- rpr. /Robert Premuz/

javaja...@gmail.com

unread,
Apr 12, 2007, 2:25:38 AM4/12/07
to
Hey Robert,
Do not copy files from the 32 to 64 bit folders, you can trust MS to
write their OS in such a way that this will cause problems.

The only workaround i can think of is to spwan a cmd.exe proccess and
ask it to run the 64bit application. I am not sure it will work but
it's worth a try.

Instead of running
ntbackup.exe
try to run
cmd.exe /c ntbackup.exe
or something like this.

good luck,
/NL

rpr...@yahoo.com

unread,
Apr 14, 2007, 4:33:21 PM4/14/07
to
Of course it would not be a good idea to copy system files from
%SystemRoot%\system32 to %SystemRoot%\SysWOW64
as you could mess things up.
I meant to copy ntbackup.exe from %SystemRoot%\system32 to another
non-system directory and then invoke the command from there
(I tried it and it works.)

Your suggestion to spawn a cmd.exe process doesn't help here.
When you invoke cmd.exe from tclsh.exe (a 32-bit application) you
start 32-bit version of cmd.exe i.e. %SystemRoot%\SysWOW64\cmd.exe.
This 32-bit cmd.exe also can't access
%SystemRoot%\system32\ntbackup.exe (64-bit application).
You can start the 64-bit ntbackup.exe only if it is somewhere outside
of %SystemRoot%\system32 tree.

-- rpr. /Robert Premuz/

0 new messages