Electron Builder - 19.22.1
Target - NSIS
I'm trying to change the default installation directory to custom(Ex: C:\MyApp) and remove default(C:\Program Files\MyApp).
package.json
{
"win": {
"target": "NSIS",
"icon": "build/icon.ico"
},
"nsis": {
"oneClick": false,
"allowElevation": true,
"allowToChangeInstallationDirectory": true,
"createDesktopShortcut": true,
"include": "build/installer.nsh"
}
}
I used !macro preInit, but didn't work:
build/installer.nsh
!macro preInit
StrCpy $INSTDIR "C:\MyApp"
!macroend
error
command StrCpy not valid outside Section or Function
It is possible to change default installation do C:\MyApp even if installer have only in elevation mode?
Electron Builder - 19.22.1Target - NSISI'm trying to change the default installation directory to custom(Ex: C:\MyApp) and remove default(C:\Program Files\MyApp).
package.json
{ "win": { "target": "NSIS", "icon": "build/icon.ico" }, "nsis": { "oneClick": false, "allowElevation": true, "allowToChangeInstallationDirectory": true, "createDesktopShortcut": true, "include": "build/installer.nsh" } }I used !macro preInit, but didn't work:
build/installer.nsh
error
It is possible to change default installation do C:\MyApp even if installer have only in elevation mode?