Opened 16 years ago
Closed 16 years ago
#741 closed Bug (No Bug)
RegRead on Win XP x64 is not Working.
Reported by: | avira1@… | Owned by: | Jon |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.2.12.1 | Severity: | None |
Keywords: | Cc: |
Description
Hi
i found a Bug in the Function RegRead on Windows XP Sp2 x64.
I will read the Registrykeys under "\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{ID}".
This is not Working...
On Windows XP Sp2 32 bit is all OK and this Bug is only on Win XP 64bit reproduceable.
Has RegRead() some Problems with {} in the Keypath and x64 bit?
Greetings,
sneubert
Attachments (1)
Change History (7)
comment:1 in reply to: ↑ description Changed 16 years ago by Valik
comment:2 Changed 16 years ago by avira1@…
Hi,
thanks for your Email.
Here a sample of my code:
If RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{E404EFD4-6110-413C-AD1A-D6D0F261960E}", "UninstallString") = "MsiExec.exe /I{E404EFD4-6110-413C-AD1A-D6D0F261960E}" And RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{E404EFD4-6110-413C-AD1A-D6D0F261960E}", "DisplayName") = "BitDefender Business Client" Then
If FileExists("C:\Program Files\BitDefender\BitDefender 2008\vsserv.exe") = 1 Then
Sleep(1500)
ShellExecute(@WindowsDir & "\system32\MsiExec.exe", "/I{E404EFD4-6110-413C-AD1A-D6D0F261960E} REMOVE=ALL REBOOT=R /q", "")
Sleep(1500)
ProgressOn("BitDefender Business Client 2008 Deinstallation", "BitDefender 08 wird deinstalliert!", "0 Prozent")
For $i = 0 To 100 Step 10
Sleep(12000)
ProgressSet($i, $i & " Prozent")
Next
ProgressSet(100, "Deinstallation abgeschlossen", "Fertig")
Sleep(500)
ProgressOff()
;Shutdown(2)
;optinaler Neustart des Systems
EndIf
EndIf
I compiled the Script with the Autoit Script 32 bit Version and execute this File on a x64 Windows XP.
The same RegRead() Function is working on Windows XP Sp2 32 bit Version without Problems.
Greetings,
sneubert
comment:3 Changed 16 years ago by Valik
See, that's not a very good test script. I don't care what your real code is, I want to see an example of you calling the function correctly and it producing incorrect results. All I see is you calling the function correctly and not getting the results you expect. There is a difference. For example, I don't see anywhere where you state just what the return value is from RegRead(). You only say it's not working.
I find your code to be very unstable. There are so many tests in it that rely on hard-coded values and I just don't think all of those are going to be the same on a 64-bit system. Especially if any of those products have an actual 64-bit version. And without actually seeing the output from any RegRead() statement, I believe one of your tests is failing and you're making a huge assumption that AutoIt is broken.
You are not proving you have a bug. Really, you're just wasting time at this point. Please *demonstrate* you have a problem.
comment:4 Changed 16 years ago by anonymous
Hi Valik,
thanks for your Email.
The File test.au3 shows you the Problem.
I start this Script on Windows XP with SP2 and x86 and this Msgbox had the correct values.
Now i start this Script on Windows XP with Sp2 x64 and this Msgbox Message had no values.
--> That is my Problem.... :D
I think this Registrykeys are also available on your System.
code:
$regRead1 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{B508B3F1-A24A-32C0-B310-85786919EF28}", "DisplayVersion")
;2.1.21022
msgbox(0, "RegRead1", $regRead1)
$regRead2 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{B508B3F1-A24A-32C0-B310-85786919EF28}", "Publisher")
;Microsoft Corporation
msgbox(0, "RegRead2", $regRead2)
greetings,
sneubert
comment:5 Changed 16 years ago by Valik
- Owner set to Jon
- Severity changed from None to Blocking
- Status changed from new to assigned
comment:6 Changed 16 years ago by Jon
- Resolution set to No Bug
- Severity changed from Blocking to None
- Status changed from assigned to closed
Running a 32bit executable on an x64 OS will be subject to registry virtualisation. So I'd expect your scripts to fail. Try either:
- Compiling as x64
- Using HKLM64 instead of HKLM or HKEY_LOCAL_MACHINE
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.
Replying to avira1@…:
32-bit version of AutoIt or 64-bit? Sample script? How do I know you just don't have a typo you haven't observed? For example, your path in this text is wrong. Registry paths do not start with a leading "\". I find it more likely that registry reflection is at play here, but still, you did not provide a script so you aren't eliminated from being the problem yet.
Please refrain from speculating on what might actually be wrong with the code, particularly if you're going to insult our intelligence. There's nothing at all special about those characters and it's kind of silly to think that they require some special handling and that we could screw it up.