Dear TCL'ers,
how may I find out, if my 32 bit wish is running on a 64 or 32 bit
Windows OS?
What I found by tcl_platform and platform::identify is, that a 32 bit
system is presented.
Is there any trick ? TWAPI ?
If "C:\Program Files (x86)" exists -> 64 bit ?
Dear TCL'ers,
how may I find out, if my 32 bit wish is running on a 64 or 32 bit
Windows OS?
What I found by tcl_platform and platform::identify is, that a 32 bit
system is presented.
Is there any trick ? TWAPI ?
If "C:\Program Files (x86)" exists -> 64 bit ?
Thanks for any idea, I feel quite dump.
On 7/5/2022 10:36 AM, Harald Oehlmann wrote:
Dear TCL'ers,
how may I find out, if my 32 bit wish is running on a 64 or 32 bit Windows OS?
What I found by tcl_platform and platform::identify is, that a 32 bit system is presented.
Is there any trick ? TWAPI ?
If "C:\Program Files (x86)" exists -> 64 bit ?
Thanks for any idea, I feel quite dump.
Harald
P.S. The background is to open the on screen keyboard from a touch-only application. The 64 bit version at an obscure path must be called on 64 bit versions. The 32 bit version exists but shows an error box:
https://stackoverflow.com/questions/8508935/getting-osk-exe-to-run-from-c-sharp
Wiki entry for this will follow on solution...
# 64 bit os
% package require registry
1.3.4
% catch [registry get {HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node} {}] val
0
% set val
%
# 32 bit os
% package require registry
1.3.3
% catch {registry get {HKEY_LOCAL_MACHINE\SOFTWARE} WOW6432Node} val
1
% set val
unable to get value "WOW6432Node" from key "HKEY_LOCAL_MACHINE\SOFTWARE": The system cannot find the file specified.
%
Dear TCL'ers,
how may I find out, if my 32 bit wish is running on a 64 or 32 bit Windows OS?
What I found by tcl_platform and platform::identify is, that a 32 bit system is presented.
Is there any trick ? TWAPI ?
If "C:\Program Files (x86)" exists -> 64 bit ?
Thanks for any idea, I feel quite dump.
Harald
P.S. The background is to open the on screen keyboard from a touch-only application. The 64 bit version at an obscure path must be called on 64 bit versions. The 32 bit version exists but shows an error box:
https://stackoverflow.com/questions/8508935/getting-osk-exe-to-run-from-c-sharp
Wiki entry for this will follow on solution...
Dear TCL'ers,
how may I find out, if my 32 bit wish is running on a 64 or 32 bit
Windows OS?
What I found by tcl_platform and platform::identify is, that a 32 bit
system is presented.
Is there any trick ? TWAPI ?
If "C:\Program Files (x86)" exists -> 64 bit ?
Thanks for any idea, I feel quite dump.
Harald
P.S. The background is to open the on screen keyboard from a touch-only application. The 64 bit version at an obscure path must be called on 64
bit versions. The 32 bit version exists but shows an error box:
https://stackoverflow.com/questions/8508935/getting-osk-exe-to-run-from-c-sharp
Wiki entry for this will follow on solution...
Dear TCL'ers,
how may I find out, if my 32 bit wish is running on a 64 or 32 bit
Windows OS?
What I found by tcl_platform and platform::identify is, that a 32 bit
system is presented.
Is there any trick ? TWAPI ?
If "C:\Program Files (x86)" exists -> 64 bit ?
Thanks for any idea, I feel quite dump.
Harald
P.S. The background is to open the on screen keyboard from a touch-only application. The 64 bit version at an obscure path must be called on 64
bit versions. The 32 bit version exists but shows an error box:
https://stackoverflow.com/questions/8508935/getting-osk-exe-to-run-from-c-sharp
Wiki entry for this will follow on solution...
# For 32- vs. 64-bit
# Technique from https://blogs.msdn.microsoft.com/david.wang/2006/03/27/howto-detect-process-bitness/
if { [string equal $env(PROCESSOR_ARCHITECTURE) "x86"] && ! [info exists env(PROCESSOR_ARCHITEW6432)] } {
set bitness 32
} else {
set bitness 64
}
On 7/5/2022 12:36 PM, Harald Oehlmann wrote:
Dear TCL'ers,
how may I find out, if my 32 bit wish is running on a 64 or 32 bit
Windows OS?
What I found by tcl_platform and platform::identify is, that a 32 bit
system is presented.
Is there any trick ? TWAPI ?
If "C:\Program Files (x86)" exists -> 64 bit ?
Thanks for any idea, I feel quite dump.
Harald
P.S. The background is to open the on screen keyboard from a touch-only
application. The 64 bit version at an obscure path must be called on 64
bit versions. The 32 bit version exists but shows an error box:
https://stackoverflow.com/questions/8508935/getting-osk-exe-to-run-from-c-sharp
Wiki entry for this will follow on solution...
Am 06.07.2022 um 05:30 schrieb Dave:
# For 32- vs. 64-bit
# Technique from
https://blogs.msdn.microsoft.com/david.wang/2006/03/27/howto-detect-process-bitness/
if { [string equal $env(PROCESSOR_ARCHITECTURE) "x86"] && ! [info
exists env(PROCESSOR_ARCHITEW6432)] } {
set bitness 32
} else {
set bitness 64
}
On 7/5/2022 12:36 PM, Harald Oehlmann wrote:
Dear TCL'ers,
how may I find out, if my 32 bit wish is running on a 64 or 32 bit
Windows OS?
What I found by tcl_platform and platform::identify is, that a 32 bit
system is presented.
Is there any trick ? TWAPI ?
If "C:\Program Files (x86)" exists -> 64 bit ?
Thanks for any idea, I feel quite dump.
Harald
P.S. The background is to open the on screen keyboard from a touch-only
application. The 64 bit version at an obscure path must be called on 64
bit versions. The 32 bit version exists but shows an error box:
https://stackoverflow.com/questions/8508935/getting-osk-exe-to-run-from-c-sharp
Wiki entry for this will follow on solution...
Dear all,
thank you for all great propositions.
Yes, tcl_platform and ::platform::identify was my first point.
Unfortunately, they are identical for a 32bit wish running on 32 and 64
bit windows.
But thank you for all the other propositions.
I prefer the twapi solution, as twapi is anyway present.
And I was surprised that even magic Cristian Gollwitzer is caring about Windows ;-).
Thank you and take care,
Harald
Am 06.07.2022 um 09:11 schrieb Harald Oehlmann:
Am 06.07.2022 um 05:30 schrieb Dave:
# For 32- vs. 64-bit
# Technique from
https://blogs.msdn.microsoft.com/david.wang/2006/03/27/howto-detect-process-bitness/
if { [string equal $env(PROCESSOR_ARCHITECTURE) "x86"] && ! [info
exists env(PROCESSOR_ARCHITEW6432)] } {
set bitness 32
} else {
set bitness 64
}
On 7/5/2022 12:36 PM, Harald Oehlmann wrote:
Dear TCL'ers,
how may I find out, if my 32 bit wish is running on a 64 or 32 bit
Windows OS?
What I found by tcl_platform and platform::identify is, that a 32 bit
system is presented.
Is there any trick ? TWAPI ?
If "C:\Program Files (x86)" exists -> 64 bit ?
Thanks for any idea, I feel quite dump.
Harald
P.S. The background is to open the on screen keyboard from a touch-only >>> application. The 64 bit version at an obscure path must be called on 64 >>> bit versions. The 32 bit version exists but shows an error box:
https://stackoverflow.com/questions/8508935/getting-osk-exe-to-run-from-c-sharp
Wiki entry for this will follow on solution...
Dear all,
thank you for all great propositions.
Yes, tcl_platform and ::platform::identify was my first point. Unfortunately, they are identical for a 32bit wish running on 32 and 64
bit windows.
But thank you for all the other propositions.
I prefer the twapi solution, as twapi is anyway present.
And I was surprised that even magic Cristian Gollwitzer is caring about Windows ;-).
Thank you and take care,Thanks for all the help. Here is the final quite complex solution:
Harald
https://wiki.tcl-lang.org/page/Keyboard+widget?V=14
Thanks,
Harald
On Wednesday, 6 July 2022 at 14:25:41 UTC+1, Harald Oehlmann wrote:
Am 06.07.2022 um 09:11 schrieb Harald Oehlmann:
Thanks for all the help. Here is the final quite complex solution:
Am 06.07.2022 um 05:30 schrieb Dave:
# For 32- vs. 64-bit
# Technique from
https://blogs.msdn.microsoft.com/david.wang/2006/03/27/howto-detect-process-bitness/
if { [string equal $env(PROCESSOR_ARCHITECTURE) "x86"] && ! [info
exists env(PROCESSOR_ARCHITEW6432)] } {
set bitness 32
} else {
set bitness 64
}
On 7/5/2022 12:36 PM, Harald Oehlmann wrote:
Dear TCL'ers,
how may I find out, if my 32 bit wish is running on a 64 or 32 bit
Windows OS?
What I found by tcl_platform and platform::identify is, that a 32 bit >>>>> system is presented.
Is there any trick ? TWAPI ?
If "C:\Program Files (x86)" exists -> 64 bit ?
Thanks for any idea, I feel quite dump.
Harald
P.S. The background is to open the on screen keyboard from a touch-only >>>>> application. The 64 bit version at an obscure path must be called on 64 >>>>> bit versions. The 32 bit version exists but shows an error box:
https://stackoverflow.com/questions/8508935/getting-osk-exe-to-run-from-c-sharp
Wiki entry for this will follow on solution...
Dear all,
thank you for all great propositions.
Yes, tcl_platform and ::platform::identify was my first point.
Unfortunately, they are identical for a 32bit wish running on 32 and 64
bit windows.
But thank you for all the other propositions.
I prefer the twapi solution, as twapi is anyway present.
And I was surprised that even magic Cristian Gollwitzer is caring about
Windows ;-).
Thank you and take care,
Harald
https://wiki.tcl-lang.org/page/Keyboard+widget?V=14
Thanks,
Harald
Not an answer to your question, but potentially to your end goal - have you tried just using [auto_execok osk.exe] ? Not extensively tested by any means but returns a suitable result on my current (64-bit Win 7) system.
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (3 / 13) |
| Uptime: | 156:32:18 |
| Calls: | 12,093 |
| Calls today: | 1 |
| Files: | 15,000 |
| Messages: | 6,517,738 |