Added a file association example to install-per-user.nsi
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7167 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
821b4d6a18
commit
b704d52400
6 changed files with 114 additions and 19 deletions
|
@ -56,14 +56,12 @@ Section "Program files (Required)"
|
|||
SetOutPath $InstDir
|
||||
WriteUninstaller "$InstDir\Uninst.exe"
|
||||
WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "DisplayName" "${NAME}"
|
||||
WriteRegStr HKCU "${REGPATH_UNINSTSUBKEY}" "DisplayIcon" "$InstDir\MyApp.exe,0"
|
||||
WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "UninstallString" '"$InstDir\Uninst.exe"'
|
||||
WriteRegDWORD HKLM "${REGPATH_UNINSTSUBKEY}" "NoModify" 1
|
||||
WriteRegDWORD HKLM "${REGPATH_UNINSTSUBKEY}" "NoRepair" 1
|
||||
|
||||
File "/oname=$InstDir\MyApp.exe" "${NSISDIR}\Bin\MakeLangId.exe" ; Pretend that we have a real application to install
|
||||
|
||||
;WriteRegStr HKLM "Software\Classes\.myfileext" "myfiletype"
|
||||
;WriteRegStr HKLM "Software\Classes\myfiletype\shell\myapp\command" "" '"$InstDir\MyApp.exe" "%1"'
|
||||
SectionEnd
|
||||
|
||||
Section "Start Menu shortcut"
|
||||
|
@ -76,9 +74,6 @@ Section -Uninstall
|
|||
Delete "$InstDir\Uninst.exe"
|
||||
RMDir "$InstDir"
|
||||
DeleteRegKey HKLM "${REGPATH_UNINSTSUBKEY}"
|
||||
;DeleteRegKey HKLM "Software\Classes\myfiletype\shell\myapp"
|
||||
;DeleteRegKey /IfEmpty HKLM "Software\Classes\myfiletype\shell"
|
||||
;DeleteRegKey /IfEmpty HKLM "Software\Classes\myfiletype"
|
||||
|
||||
Delete "$SMPrograms\${NAME}.lnk"
|
||||
SectionEnd
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue