You are here

[RegistryKeys] HKLM doesn't work sometimes

7 posts / 0 new
Last post
XpucT
XpucT's picture
Offline
Last seen: 5 months 3 weeks ago
Joined: 2008-07-30 21:43
[RegistryKeys] HKLM doesn't work sometimes

Hi, everyone!
So, I have a problem with [RegistryKeys]

When I do so:
[RegistryKeys]
HKCU=HKCU\Software\AppName

It always work.

When I do so:
[RegistryKeys]
HKLM=HKLM\Software\AppName

It sometimes doesn't work.

I noticed that I have the same problem with Common Files folder (sometimes — not always) and I can't understand what it depends on.

The same bug I have when I'm trying to do something like that:
HKLM\SOFTWARE\AppName\Name=REG_BINARY:12345
And it always perfectly works if I do so:
HKCU\SOFTWARE\AppName\Name=REG_BINARY:12345

The point is I need exactly HKLM.

Another problem I noticed: If something wrong with one of the methods of playing around with HKLM, everything with HKLM wont work.

P.S. And yes, I was trying a Custom.nsh
It just wont work.

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 30 min ago
AdminDeveloperModerator
Joined: 2005-11-28 22:21
HKLM requires admin rights

You can't write to or alter HKLM keys without admin rights. Your launcher must be set to require admin if you need to write to those keys: https://portableapps.com/manuals/PortableApps.comLauncher/ref/launcher.i...

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

XpucT
XpucT's picture
Offline
Last seen: 5 months 3 weeks ago
Joined: 2008-07-30 21:43
Exactly. I already have it

Exactly. I already have it
RunAsAdmin=force
Doesn't help

P.S. And yes, I tryied compile-force

-------------------
I have admin account and disable UAC for always.
So I don't have any problem with HKLM and stuffs like that, but sometimes like right now I just can't do anything with this app.
For example, I created 3 apps in last 3 days. 1 app works with HKLM, another one doesn't, and the 3-rd one again works fine. Seems like some bug in PAL.
Another reason to think like that is impossibility to use [RegistryCleanupForce] or [RegistryValueBackupDelete]. It just doesn't work. Like Common Files — sometimes I just can't delete empty folder like:
[DirectoriesCleanupIfEmpty]
1=%APPDATA%\AppName
Or
[DirectoriesMove]
CommonFiles=%COMMONPROGRAMFILES%\AppName

I need more ideas. Thank you.

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

All those features work for me here on my main box and the VMs I have. We have multiple apps that rely on all of that. Except for RegistryCleanupForce as that's not allowed in released apps since it clobbers the local app's keys.

Have you checked to see if that particular HKLM key or branch is set with special permissions? Sometimes, apps set HKLM keys with system level permissions or otherwise so that even an admin can't delete the key without assuming ownership first. An example of this would be IObit Unlocker which we use custom code to use AccessControl to give us the ability to alter those keys.

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

XpucT
XpucT's picture
Offline
Last seen: 5 months 3 weeks ago
Joined: 2008-07-30 21:43
It's kinda private a little

It's kinda private a little bit, so I'll email you, if you don't mine.

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 30 min ago
AdminDeveloperModerator
Joined: 2005-11-28 22:21
Registration Key?

From the video, it looks like it may be a registration key of some sort. So, it's possible the app is altering the permissions on it.

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

XpucT
XpucT's picture
Offline
Last seen: 5 months 3 weeks ago
Joined: 2008-07-30 21:43
I thought so too

I've just install Windows 10 now. Without permissions. And all the same.

it's possible the app is altering the permissions on it

I thought so too, but launcher doing its job first, right? So it must write to HKLM. But it can't.

Log in or register to post comments