Hmm. Seems like I'm being lead a little bit here. Ok.
Alright so what should probably happen then is if reading the registry fails to return a result for "SetRegView 64" then read it again after doing "SetRegView 32".
The logic and sequence for checking 32-bit registry space would go something like this:
1) IF 64-bit system
a) "SetRegView 64"
b) Read registry
c) IF no-errors we have a JRE path (goto "NoErrors")
2) "SetRegView 32"
a) Read registry
b) IF no-errors we have a JRE path (goto "NoErrors").
c) ELSE set JRE path = ""
3) Switch back to 64-bit mode?
Because it affects all ReadRegStr/WriteRegStr commands elsewhere in the script.