Jump to content
Paint.NET 5.1 is now available! ×

Recommended Posts

Posted

If you're seeing this on install:

System.UnauthorizedAccessException: Access to the registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Paint.NET' is denied.

at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)

at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck, RegistrySecurity registrySecurity)

at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey)

at PaintDotNet.SetupNgen.MainImpl(String[] args)

at PaintDotNet.SetupNgen.Main(String[] args)

The quick fix is to create the HKLM\Software\Paint.Net key *before you run the installer* and add full permission on either the Everyone user or your username .

Some info for the devs:

The installer bootstrapper is running the Ngen process in the user's context, but the key only has write permission with the System context.

Some ways to fix this:

1) Move ngen into the MSI as a deferred custom action.

2) Add LockPermission entry to MSI table for everyone or username with full access.

3) Fixup registry in SetupFrontEnd code.

The last one is probably the simplest, and since you're running ngen there, it would probably make the most sense.

If you need further help, let me know.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...