Jump to content

regread not as I expect using HKLM64 on 32 bit OS


martin
 Share

Recommended Posts

I expected that RegEnum("HKLM64",1) would fail on a 32 bit OS so that it could indicate that the OS is 32 bit, but it doesn't fail.

$key = RegEnumKey ( "HKEY_LOCAL_MACHINE64\HARDWARE", 1 )
$IsOS64 = @error = 0
MsgBox(0,$key,$isos64);reports the key and says true, but HKLM64 doesn't exist.

Also, RegRead returns the registry values as thought the 64 was omitted. EG

$var = RegRead("HKEY_LOCAL_MACHINE64\SOFTWARE\Microsoft\Windows\CurrentVersion", "ProgramFilesDir")
MsgBox(4096, "Program files are in:", $var);gives answer as though HKLM was used, HKLM64 doesn't exist

Is this the fault of Windows, a bug in AutoIt or is it intentional?

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

I expected that RegEnum("HKLM64",1) would fail on a 32 bit OS so that it could indicate that the OS is 32 bit, but it doesn't fail.

$key = RegEnumKey ( "HKEY_LOCAL_MACHINE64\HARDWARE", 1 )
$IsOS64 = @error = 0
MsgBox(0,$key,$isos64);reports the key and says true, but HKLM64 doesn't exist.

Also, RegRead returns the registry values as thought the 64 was omitted. EG

$var = RegRead("HKEY_LOCAL_MACHINE64\SOFTWARE\Microsoft\Windows\CurrentVersion", "ProgramFilesDir")
MsgBox(4096, "Program files are in:", $var);gives answer as though HKLM was used, HKLM64 doesn't exist

Is this the fault of Windows, a bug in AutoIt or is it intentional?

I have asked the devs for a definitive answer to this in Dev Chat. Now we can sit back and wait for someone to take a look at it.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

I have asked the devs for a definitive answer to this in Dev Chat. Now we can sit back and wait for someone to take a look at it.

Thanks, of course you can see how I got there.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Thanks, of course you can see how I got there.

I know how you got there. I do become a problem some days.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Well we have our difinitive answer (from none other than the head honcho). @ProcessorArch reads the OS not the processor.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...