I have NSIS Installer building from electron-builder and works fine. I can see App_Guid registry key as well. Now i have to make an entry into windows registry under certain path (e.g. HKLM/WOWXXX/CRDL/{APP_NAME} when installing installer.
How can I tweak the installer/build script to create registry entry when we install it?
Appreciate help.
Current installer.nsh
!macro preInit
SetRegView 64
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\ProgramData\CRDL\UFP"
WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\ProgramData\CRDL\UFP"
SetRegView 32
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\ProgramData\CRDL\UFP"
WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\ProgramData\CRDL\UFP"
!macroend
This is my intaller.nsh
_!macro customInstall
SetRegView 64
WriteRegStr HKCR "cloud" "" "URL:yunpan"
WriteRegStr HKCR "cloud" "URL Protocol" ""
WriteRegStr HKCR "cloudshell" "" ""
WriteRegStr HKCR "cloudshell\open" "" ""
WriteRegStr HKCR "cloudshell\open\command" "" '"$INSTDIR\cloud_app.exe" "%1"'
SetRegView 32
WriteRegStr HKCR "cloud" "" "URL:yunpan"
WriteRegStr HKCR "cloud" "URL Protocol" ""
WriteRegStr HKCR "cloudshell" "" ""
WriteRegStr HKCR "cloudshell\open" "" ""
WriteRegStr HKCR "cloudshell\open\command" "" '"$INSTDIR\cloud_app.exe" "%1"'
!macroend
!macro customUnInstall
DeleteRegKey HKCR "cloud"
!macroend_
It resgists a URL Protocol called cloud when installing the app.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
This is my intaller.nsh
_!macro customInstall
SetRegView 64
WriteRegStr HKCR "cloud" "" "URL:yunpan"
WriteRegStr HKCR "cloud" "URL Protocol" ""
WriteRegStr HKCR "cloudshell" "" ""
WriteRegStr HKCR "cloudshell\open" "" ""
WriteRegStr HKCR "cloudshell\open\command" "" '"$INSTDIR\cloud_app.exe" "%1"'
SetRegView 32
WriteRegStr HKCR "cloud" "" "URL:yunpan"
WriteRegStr HKCR "cloud" "URL Protocol" ""
WriteRegStr HKCR "cloudshell" "" ""
WriteRegStr HKCR "cloudshell\open" "" ""
WriteRegStr HKCR "cloudshell\open\command" "" '"$INSTDIR\cloud_app.exe" "%1"'
!macroend
!macro customUnInstall
DeleteRegKey HKCR "cloud"
!macroend_
It resgists a URL Protocol called cloud when installing the app.