You are here

[Bug] PAL needs to be able to disable Wow6432Node redirection

14 posts / 0 new
Last post
Bennieboj
Bennieboj's picture
Offline
Last seen: 1 year 12 months ago
Joined: 2010-09-16 07:28
[Bug] PAL needs to be able to disable Wow6432Node redirection

Hi all,

I have a problem with the registry.
I have a game that writes into install=HKLM\SOFTWARE\makername\gamename.
The backup and restoring using PAL all works on Windows 32 bit, but on a 64 bit it goes into HKLM\SOFTWARE\Wow6432Node\makername\gamename.
The game can't find it: errors, nothing works anymore.

So I thought to use custom code to disable redirection with "SetRegView 64".
I don't know if it works, since I don't know how to do the backuping, importing and restoring in NSIS, like PAL does.

That's the problem and what I tried so far.
Any help please?
Thanks in advance.

[Escalated to a bug report as it's very important missing functionality which needs to go in PAL 3.0 - mod Chris]

Bennieboj
Bennieboj's picture
Offline
Last seen: 1 year 12 months ago
Joined: 2010-09-16 07:28
Thanks

Thanks for the update Chris!

Yes, I set the working directory!

CODYQX4
Offline
Last seen: 2 years 5 months ago
Joined: 2010-04-23 20:39
Perhaps something like the

Perhaps something like the following would work:

[RegistryKeys]
SomeKey1=HKCU\Software\SomeKey
SomeKey2=HKLM\Software\SomeKey2

[RegistryKeys:DisableWow6432Node]
SomeKey3=HKLM\Software\SomeKey3

The first case is how we do it now, the second is an example of how we could control things.

In a 64 Bit OS, SomeKey1 would not be redirected as HKCU typically isn't subject to redirection. SomeKey2 would be redirected.

SomeKey3 would have redirection disabled by the special section.

You would want to export all keys in 32 bit mode, as 64 bit mode would add Wow6432Node to the path in the file. You would import all keys in the first INI section using 32 bit mode, and use 64 bit mode to import the second entries.

What I mean by 32 bit mode is that if you have a reg file, and it goes to HKLM\SOFTWARE\AKey (no Wow6432Node in the file), if you import it with cmd.exe *32 (running under WOW64), it will be imported to HKLM\SOFTWARE\Wow6432Node\AKey. If you used the 64 bit CMD.exe, it would not be redirected.

Bennieboj
Bennieboj's picture
Offline
Last seen: 1 year 12 months ago
Joined: 2010-09-16 07:28
Status?

What's the status on this?
I haven't heard anything about the development of PAL 3.0 for half a year. Is it possible for a mod to give a little bit more info?
Thanks in advance Eye

Yes, I set the working directory!

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 53 min ago
AdminDeveloperModerator
Joined: 2005-11-28 22:21
Not Sure

I know Chris is quite busy. Aluisio may have more insight.

Side Note: This bug isn't affecting any potential releases, as a game would not be permitted to require admin rights.

Sometimes, the impossible can become possible, if you're awesome!

Bennieboj
Bennieboj's picture
Offline
Last seen: 1 year 12 months ago
Joined: 2010-09-16 07:28
OK

Thanks for the fast response, I'll wait for Aluisio's response Smiling

Yes, I set the working directory!

Bennieboj
Bennieboj's picture
Offline
Last seen: 1 year 12 months ago
Joined: 2010-09-16 07:28
Status again?

So it's 2014 now almost a year after I last asked about this bug.

As this is "very important missing functionality which needs to go in PAL 3.0", according to Chris, how is the status of PAL 3.0?
Is there still someone developing PAL 3.0?

Is the source code made publically available on, e.g. Github or Sourceforge? Users making pull requests should speed up the process quite a bit.

Yes, I set the working directory!

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 53 min ago
AdminDeveloperModerator
Joined: 2005-11-28 22:21
Source

The source has always been available from SF and is linked directly from the PA.c Launcher page.

Chris is mostly busy with life and not working on PAL at present. Presently, no work is being done on PAL 3.0.

Until it is complete, you can manually use Custom Code to accomplish manual read/write/restore to the 64-bit HKLM and HKCU hives for 64-bit apps.

Sometimes, the impossible can become possible, if you're awesome!

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 6 hours 5 min ago
DeveloperModerator
Joined: 2008-07-24 18:46
Implementing DisableRedirect sections

For those following this bug, I'm currently implementing DisableRedirect variants of the RegistryKeys, RegistryValueBackupDelete, RegistryValueWrite and both RegistryCleanup sections.

FukenGruven
FukenGruven's picture
Offline
Last seen: 3 years 2 months ago
Joined: 2011-01-29 02:15
not a bug

NSIS is a 32bit executable..

if you want to read/write in x64 registry..
use Custom code..

takes only a few lines..

set in .OnInit

ie.

!include x64.nsh

${SegmentFile}
${Segment.OnInit}
${If} ${RunningX64}
   SetRegView 64
   ${DisableX64FSRedirection}
${EndIf}
!macroend

if you want to use the launcher..
then use ReadINIStr or ${ReadLauncherConfig}

if you really don't want to use Custom Code
then you can edit the source to have your own custom Launcher sections..
so end-users don't have to deal with Custom code.

if you don't want to edit anything at all..
then redesign PAL with NSIS 3.0 x64 ..
it's been released.

I use PortableApps on my PC..

freemp
Offline
Last seen: 3 years 2 months ago
Joined: 2007-09-08 09:41
Tried that but it's not

Tried that but it's not working. ${RunningX64} is true but SetRegView 64 seems to be ignored. Registry values still go to ...\Wow6432node\...

FukenGruven
FukenGruven's picture
Offline
Last seen: 3 years 2 months ago
Joined: 2011-01-29 02:15
it's you

Google around for PortableApps sites and blogs..
there are tons of them..

download their sources and take a look ..
i have tons of x64 applications designed w/PAF..

I use PortableApps on my PC..

freemp
Offline
Last seen: 3 years 2 months ago
Joined: 2007-09-08 09:41
no, it's not me

it's the code that you published that's not working.

anyway, already found another workaround.

FukenGruven
FukenGruven's picture
Offline
Last seen: 3 years 2 months ago
Joined: 2011-01-29 02:15
Really? Teach me

what was the workaround?

can you show us?

I use PortableApps on my PC..

Log in or register to post comments