JD NSIS Setup: FileAssociation: Better Registry Cleanup

git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@9326 ebf7c1c2-ba36-0410-9fe8-c592906822b4
This commit is contained in:
scr4ve 2009-10-27 16:40:10 +00:00
parent 77414e7246
commit 0a49e4e598
2 changed files with 6 additions and 3 deletions

4
Manifest.MF Normal file
View File

@ -0,0 +1,4 @@
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: JD-Team

View File

@ -190,7 +190,7 @@ ${EndIf}
Push $1
${If} $ADMINATINSTALL > 0
DeleteRegKey HKCR $R1 ;Delete key with association name settings
ReadRegStr $1 HKCR $R0 ""
StrCmp $1 $R1 0 NoOwnAdmin ; only do this if we own it
ReadRegStr $1 HKCR $R0 "backup_val"
@ -201,11 +201,11 @@ ${If} $ADMINATINSTALL > 0
RestoreAdmin:
WriteRegStr HKCR $R0 "" $1
DeleteRegValue HKCR $R0 "backup_val"
DeleteRegKey HKCR $R1 ;Delete key with association name settings
NoOwnAdmin:
${Else}
DeleteRegKey HKCU "Software\Classes\$R1" ;Delete key with association name settings
ReadRegStr $1 HKCU "Software\Classes\$R0" ""
StrCmp $1 $R1 0 NoOwnUser ; only do this if we own it
ReadRegStr $1 HKCU "Software\Classes\$R0" "backup_val"
@ -216,7 +216,6 @@ ${Else}
RestoreUser:
WriteRegStr HKCU "Software\Classes\$R0" "" $1
DeleteRegValue HKCU "Software\Classes\$R0" "backup_val"
DeleteRegKey HKCU "Software\Classes\$R1" ;Delete key with association name settings
NoOwnUser:
${EndIf}