file association fix
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3268 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
a00901c80f
commit
e53d122cfd
1 changed files with 22 additions and 32 deletions
|
@ -131,44 +131,34 @@ Section "NSIS Core Files (required)" SecCore
|
||||||
RMDir $INSTDIR\Docs
|
RMDir $INSTDIR\Docs
|
||||||
|
|
||||||
ReadRegStr $R0 HKCR ".nsi" ""
|
ReadRegStr $R0 HKCR ".nsi" ""
|
||||||
StrCmp $R0 "NSISFile" 0 no_nsioldassoc
|
StrCmp $R0 "NSISFile" 0 +2
|
||||||
DeleteRegKey HKCR "NSISFile"
|
DeleteRegKey HKCR "NSISFile"
|
||||||
Goto nsi
|
|
||||||
no_nsioldassoc:
|
|
||||||
|
|
||||||
StrCmp $R0 "NSIS.Script" 0 no_nsi
|
WriteRegStr HKCR ".nsi" "" "NSIS.Script"
|
||||||
nsi:
|
WriteRegStr HKCR "NSIS.Script" "" "NSIS Script File"
|
||||||
WriteRegStr HKCR ".nsi" "" "NSIS.Script"
|
WriteRegStr HKCR "NSIS.Script\DefaultIcon" "" "$INSTDIR\makensisw.exe,1"
|
||||||
WriteRegStr HKCR "NSIS.Script" "" "NSIS Script File"
|
ReadRegStr $R0 HKCR "NSIS.Script\shell\open\command" ""
|
||||||
WriteRegStr HKCR "NSIS.Script\DefaultIcon" "" "$INSTDIR\makensisw.exe,1"
|
StrCmp $R0 "" 0 no_nsiopen
|
||||||
ReadRegStr $R0 HKCR "NSIS.Script\shell\open\command" ""
|
WriteRegStr HKCR "NSIS.Script\shell" "" "open"
|
||||||
StrCmp $R0 "" 0 no_nsiopen
|
WriteRegStr HKCR "NSIS.Script\shell\open\command" "" 'notepad.exe "%1"'
|
||||||
WriteRegStr HKCR "NSIS.Script\shell" "" "open"
|
no_nsiopen:
|
||||||
WriteRegStr HKCR "NSIS.Script\shell\open\command" "" 'notepad.exe "%1"'
|
WriteRegStr HKCR "NSIS.Script\shell\compile" "" "Compile NSIS Script"
|
||||||
no_nsiopen:
|
WriteRegStr HKCR "NSIS.Script\shell\compile\command" "" '"$INSTDIR\makensisw.exe" "%1"'
|
||||||
WriteRegStr HKCR "NSIS.Script\shell\compile" "" "Compile NSIS Script"
|
WriteRegStr HKCR "NSIS.Script\shell\compile-compressor" "" "Compile NSIS Script (Choose Compressor)"
|
||||||
WriteRegStr HKCR "NSIS.Script\shell\compile\command" "" '"$INSTDIR\makensisw.exe" "%1"'
|
WriteRegStr HKCR "NSIS.Script\shell\compile-compressor\command" "" '"$INSTDIR\makensisw.exe" /ChooseCompressor "%1"'
|
||||||
WriteRegStr HKCR "NSIS.Script\shell\compile-compressor" "" "Compile NSIS Script (Choose Compressor)"
|
|
||||||
WriteRegStr HKCR "NSIS.Script\shell\compile-compressor\command" "" '"$INSTDIR\makensisw.exe" /ChooseCompressor "%1"'
|
|
||||||
no_nsi:
|
|
||||||
|
|
||||||
ReadRegStr $R0 HKCR ".nsh" ""
|
ReadRegStr $R0 HKCR ".nsh" ""
|
||||||
StrCmp $R0 "NSHFile" 0 no_nsholdassoc
|
StrCmp $R0 "NSHFile" 0 +2
|
||||||
DeleteRegKey HKCR "NSHFile"
|
DeleteRegKey HKCR "NSHFile"
|
||||||
Goto nsh
|
|
||||||
no_nsholdassoc:
|
|
||||||
|
|
||||||
StrCmp ".nsh" "NSIS.Header" 0 no_nsh
|
WriteRegStr HKCR ".nsh" "" "NSIS.Header"
|
||||||
nsh:
|
WriteRegStr HKCR "NSIS.Header" "" "NSIS Header File"
|
||||||
WriteRegStr HKCR ".nsh" "" "NSIS.Header"
|
WriteRegStr HKCR "NSIS.Header\DefaultIcon" "" "$INSTDIR\makensisw.exe,1"
|
||||||
WriteRegStr HKCR "NSIS.Header" "" "NSIS Header File"
|
ReadRegStr $R0 HKCR "NSIS.Header\shell\open\command" ""
|
||||||
WriteRegStr HKCR "NSIS.Header\DefaultIcon" "" "$INSTDIR\makensisw.exe,1"
|
StrCmp $R0 "" 0 no_nshopen
|
||||||
ReadRegStr $R0 HKCR "NSIS.Header\shell\open\command" ""
|
WriteRegStr HKCR "NSIS.Header\shell" "" "open"
|
||||||
StrCmp $R0 "" 0 no_nshopen
|
WriteRegStr HKCR "NSIS.Header\shell\open\command" "" 'notepad.exe "%1"'
|
||||||
WriteRegStr HKCR "NSIS.Header\shell" "" "open"
|
no_nshopen:
|
||||||
WriteRegStr HKCR "NSIS.Header\shell\open\command" "" 'notepad.exe "%1"'
|
|
||||||
no_nshopen:
|
|
||||||
no_nsh:
|
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue