TeeWeTee
27th February 2013 15:51 UTC
Understanding SetRegView
Hi,
just to verify that I understood it correctly:
Since i use 32Bit NSIS, i got an 32BIT installer, which by default works in 32Bit "area".
#Windows 32Bit:
ReadRegStr HKLM Software\JavaSoft (e.g. for Java 32 Bit)
#Windows 64Bit:
ReadRegStr HKLM Software\JavaSoft (e.g. for Java 32 Bit)
#Got redirected -> thus the key is actually taken from:
#HKLM SOFTWARE\Wow6432Node\JavaSoft (e.g. for Java 32 Bit)
Is the following the same as above? (Should be :)
#Windows 32Bit:
SetRegView 32
ReadRegStr HKLM Software\JavaSoft (e.g. for Java 32 Bit)
#Windows 64Bit:
SetRegView 32
ReadRegStr HKLM Software\JavaSoft (e.g. for Java 32 Bit)
If i now want to check the 64 bit "area":
#Windows 64Bit:
SetRegView 64
ReadRegStr HKLM SOFTWARE\JavaSoft (e.g. for Java 64Bit)
#No rederection -> thus the key is taken from:
#HKLM SOFTWARE\JavaSoft (e.g. for Java 64 Bit)
MSG
27th February 2013 16:20 UTC
Yes, all of the above is correct.
(Remember to reset regview to 32 after you're done with x64 registry.)
TeeWeTee
27th February 2013 16:45 UTC
Highly appreciated your confirmation.
One last thing, I have read that:
SetRegView 64
on a 32Bit system sometimes causes problems. Thus it has to be wrapped with
${If} ${RunningX64}
SetRegView 64
${EndIf}
But there shouldn't be a problem calling plain
SetRegView 32
on a 32Bit system, right?
MSG
28th February 2013 07:25 UTC
Sure, but I find it highly unlikely that setregview 64 would cause problems on an x86 system.
Afrow UK
28th February 2013 16:05 UTC
Who said it would cause problems? It just sets an extra flag on the registry API call which older operating systems (i.e. non 64-bit) will just ignore (because they are not aware the flag exists). There is no need to wrap it in an ${If}.
Stu
MSG
28th February 2013 16:11 UTC
I didn't say "impossible" because there could always be a very stupid bug in NSIS... But yeah, I doubt that very much.
Afrow UK
28th February 2013 16:47 UTC
Originally posted by MSG
I didn't say "impossible" because there could always be a very stupid bug in NSIS... But yeah, I doubt that very much.
It was in response to TeeWeTee rather than your post (I should have quoted) - I'm curious as to where he read that it can cause problems.
Stu
TeeWeTee
1st March 2013 09:34 UTC
I was referring to the following post:
SetRegView and DeleteRegKey
You should only use SetRegView 64 on XP x64. Not all 32-bit versions of Windows support this flag and some might cause registry operations to fail, just like in your case.
But maybe I over interpreted it ;)
Afrow UK
1st March 2013 14:43 UTC
That's interesting and news to me. I've used SetRegView 64 on 32-bit XP for years with no issues so perhaps Microsoft fixed the issue with a service pack at some point.
Edit: Further research suggests that having the flag set will cause registry operations to fail on Windows 2000 - so now I would suggest wrapping it in an ${If} for the sake of compatibility with XP and 2000.
Stu