Old 14th November 2012, 05:46   #1
stass
Senior Member
 
Join Date: Nov 2012
Posts: 145
Full access to the registry keys in Windows 8

I need to delete the key:
code:
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\UserChoice"


and then create it with a different value :
code:
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\UserChoice" "Progid" "MyApp.jpg"


This key need full access. Any means to gain full access you can not .. AccessControl plugin does not work in Windows 8 ...
Please help to solve this problem.
stass is offline   Reply With Quote
Old 14th November 2012, 06:41   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,148
This registry key is protected to stop people like you from messing with it.

You are supposed register your application/file type in the documented way, the user will then pick their desired default.

The FileExts key was added as a layer on top of that and only explorer is supposed to touch it. The UserChoice key was added later and defines the default progid. In Win8 the security of this key was changed, probably because people could not keep their fingers away from it.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 14th November 2012, 06:42   #3
redxii
Senior Member
 
Join Date: Nov 2005
Posts: 115
I'm not sure why you don't already have full access, since it is under HKCU. But, Windows 8 prevents programatically changing a user's file associations anyway so it might not work, the user has to manually associate it in Default Programs.
redxii is offline   Reply With Quote
Old 14th November 2012, 06:51   #4
stass
Senior Member
 
Join Date: Nov 2012
Posts: 145
Quote:
Originally Posted by Anders View Post
This registry key is protected to stop people like you from messing with it.

You are supposed register your application/file type in the documented way, the user will then pick their desired default.
No messing with these keys is not going. Write a program with a fixed file associations.
How to do this using NSIS?

Quote:
This registry key is protected
I asked a specific question - how to remove this protection?
stass is offline   Reply With Quote
Old 14th November 2012, 06:51   #5
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,148
Quote:
Originally Posted by redxii View Post
I'm not sure why you don't already have full access, since it is under HKCU. But, Windows 8 prevents programatically changing a user's file associations anyway so it might not work, the user has to manually associate it in Default Programs.
You don't have write access to all keys under HKCU, the policy key(s) etc...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 14th November 2012, 06:54   #6
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,148
MSDN has information about file types:
http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx
http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 14th November 2012, 06:55   #7
stass
Senior Member
 
Join Date: Nov 2012
Posts: 145
You can implement this in the AccessControl plugin?
stass is offline   Reply With Quote
Old 14th November 2012, 06:56   #8
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,148
Quote:
Originally Posted by stass View Post
You can implement this in the AccessControl plugin?
You are not supposed to touch the UserChoice key, use the documented keys, they don't require special access...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 14th November 2012, 06:58   #9
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,148
Quote:
Originally Posted by stass View Post
I asked a specific question - how to remove this protection?
People will use this information for evil, it is better for Windows users everywhere if it stays a secret...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 14th November 2012, 07:07   #10
stass
Senior Member
 
Join Date: Nov 2012
Posts: 145
I understand ... But why not help the user NSIS, setting he needed associations? For example, to make a plugin for the file associations in windows 8. Can it be a secret?
stass is offline   Reply With Quote
Old 14th November 2012, 07:10   #11
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,148
Quote:
Originally Posted by stass View Post
I understand ... But why not help the user NSIS, setting he needed associations? For example, to make a plug for the file associations in windose 8. Can it be a secret?
See the MSDN links I posted, this is all the information you need to register a file type...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 10th December 2013, 20:57   #12
ronacker
Junior Member
 
Join Date: Dec 2013
Posts: 1
This is a bit of a tangent but...

I have a Bluetooth keyboard that has become "un-paired" with my Win8 tablet. When I try to "re-pair" it, Win 8 doesn't show it because it is already in Device manager. The posts from other sites say to uninstall the device but not only does that not work but the device keeps coming back. I figured the only way to get it completely uninstalled was to delete all of the entries in the registry that reference its internal address but some are protected and won't let me delete them.

So, any MSDN links or other suggestions on how to fix this without having full access to the registry?
ronacker is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump