Old 21st September 2015, 04:29   #1
gruntlord6
Junior Member
 
Join Date: Jul 2010
Posts: 14
Deleting compatibility keys

Lately, I've been having issues with users turning on compatibility mode and breaking my application. I would like to remove the compatibility registry key through the installer rather then walk the user through doing so manually.

so far, it looks like the following:
DeleteRegKey HKCU "$INSTDIR\APP\APP.EXE"
But this does not delete the affected key. Am I doing something wrong? Is this even the proper key I should be deleting? Any help is appreciated.
gruntlord6 is offline   Reply With Quote
Old 21st September 2015, 09:41   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
You need to specify the registry path, the key you are after is somewhere under \Software\Microsoft, perhaps Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 21st September 2015, 19:01   #3
gruntlord6
Junior Member
 
Join Date: Jul 2010
Posts: 14
Quote:
Originally Posted by Anders View Post
You need to specify the registry path, the key you are after is somewhere under \Software\Microsoft, perhaps Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers?
I guess that would help huh? Guess I had a brain fart. So the line should look like this?

DeleteRegKey HKCU "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\$INSTDIR\APP\APP.EXE"

looks fine, but the registry key is still there, must be something else I'm missing or overlooking.
gruntlord6 is offline   Reply With Quote
Old 21st September 2015, 19:11   #4
gruntlord6
Junior Member
 
Join Date: Jul 2010
Posts: 14
Looks like I was also using the wrong function, finally figured it out. The line that I tested and confirmed working is this:
DeleteRegValue HKCU "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" "$INSTDIR\APP\APP.EXE"
gruntlord6 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