I can detect the 32-bit WISH by $tcl_platform(pointerSize).
Any ideas how to detect the underlying 64-bit Windows ?
Regards,
Rolf.
if { [info exists ::env(ProgramW6432)] } {
...
if { [string match "*64" $::env(PROCESSOR_ARCHITECTURE)] } {
puts "Okay, we are a 64-bit EXE on a 64-bit Windows"
} elseif { [string match "x86" $::env(PROCESSOR_ARCHITECTURE)] } {
if { [info exists env(PROCESSOR_ARCHITEW6432)] } {
error "Cannot run this 32-bit on a 64-bit Windows !"
} else {
puts "Okay, we are a 32-bit EXE on a 32-bit Windows"
}
} else {
error "Unsupported OS/architecture"
}
Rolf.
> error "Cannot run this 32-bit on a 64-bit Windows !"
I didn't check it - but is it true (that one cannot run 32-bit on a 64-bit
Windows)?
--
Z.
Answers range from "no" to "it varies". Sorry, no scalar answer - only
vectors :) Almost all the 32 bit stuff I've tried works fine.
For 16 bit, you'll need virtualization.
--
Les Cargill
This is true for my application, because it uses a 3rd-party DLL &
device driver available at 64-bit for Win64 and at 32-bit for Win32.
(32-bit device drivers do not run on Win64).
A basic exe should run (other than drivers, as Rolf notes); but dependencies get complicated. 32-bit apps can't inherently call 64-bit DLLs, for example.
The simpler the EXE, the more chance it has of running.