Archive: SetRegView and DeleteRegKey


SetRegView and DeleteRegKey
Hello,

I have an installer that works on both Win XP 32 and Win XP 64 and that can install 32 bit builds on both platforms, and 64 bits builds on WIn XP 64.

By default I call SetRegView 64 (even on 32 bits) to be sure to be in the "main" registry trunk.

Everything works fine except for DeleteRegKey that does not work on Win XP 32 bits if SetRegView 64 was used.

First of all I wanted to point this inconsistency in behavior.

Also I have a question: How can I know if I am running on Win32 or Win64.

Thanks in advance,

Tieum


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.


The DeleteRegKey problem is probably a windows bug and not nsis, either way, using SetRegView 64 on 32 bit systems is not supported

To detect x64, include x64.nsh

${If} ${RunningX64}
MessageBox MB_OK "running on x64"
${EndIf}

edit: gah too slow, kichik beat me to it


All thanks for your help will use the thing to detect which platform I'm on.