I would like to change the install directory on Windows, my Electron App is built with electron-builder
.
I've tried putting a installer.nsh
file inside the build folder, but it's still the same, it always installs under the default path AppData/Roaming/
.
This is my installer.nsh
:
!macro preInit
SetRegView 64
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\CustomPath"
WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\CustomPath"
SetRegView 32
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\CustomPath"
WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\CustomPath"
!macroend
Has anyone managed to change the default install directory with electron-builder?
Thank you!