#791 closed Bug (No Bug)
EnvGet returns wrong value for PROCESSOR_ARCHITECTURE AMD4
Reported by: | Dreamer | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.3.0.0 | Severity: | None |
Keywords: | PROCESSOR ARCHITECTURE 64bit XP | Cc: |
Description
EnvGet returns x86 as the PROCESSOR_ARCHITECTURE on my Win XP Pro 64bit system. I used the latest AutoIt3 - v 3.3.0.0 from Dec 24th.
I have not found any way to identify a 64 bit OS from an AutoIt3 scripts.
MsgBox(4096,"EnvGet does not get correct architecture",EnvGet("PROCESSOR_ARCHITECTURE")) # This is a Win XP 64 bit machine - Command line shows: # C:\temp>echo %PROCESSOR_ARCHITECTURE% # AMD64 # BUT, EnvGet returns x86 # AutoIt 3.3 released Dec 24th
Attachments (0)
Change History (4)
comment:1 Changed 16 years ago by TicketCleanup
- Severity changed from Blocking to None
comment:2 Changed 16 years ago by Valik
- Resolution set to No Bug
- Status changed from new to closed
The environment variable PROCESSOR_ARCHITECTURE is the same thing as AutoIt's @CPUArch. So with that in mind:
- On 64-bit Windows a 64-bit process will see x64 from @CPUArch.
- On 64-bit Windows a 32-bit process will see x86 from @CPUArch.
- On 64-bit Windows a 64-bit process will see x64 from @OSArch.
- On 64-bit Windows a 32-bit process will see x64 from @OSArch.
As for the additional comments you tried to post. I don't care what Perl does. Perl may not be doing what you think it does. It may be up to some shenanigans behind the scenes that is tricking you into thinking it's doing the right thing when it's doing something that is misleading. If you stop and think about how Windows works with a 32-bit process on 64-bit Windows you'll realize the behavior you see is correct for backwards compatibility.
Sorry about your additional comments being rejected. You can blame an idiot for the draconian policies we currently have in place which is causing a lot of people to have their tickets rejected.
comment:3 Changed 16 years ago by Jpm
You shoud direct your request to Microsoft as this Env variable is done by Windows not by AutoIt ...
comment:4 Changed 16 years ago by anonymous
Thank you for your comments and insight that you provided. It is indeed confusing when I find that some environmental variables are reported correctly (i.e. compared with echo %VARIABLE% on command line) and others are not. Since Perl seems to properly work around Microsoft problems, it must indeed hide the discrepancies. And, I am not asking you to change this. However, it might be nice to put some kind of note in your help file that not all environment variables are created "equal."
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Automatic ticket cleanup.