I have an electron app, I want the default installation path to be D: if it exist, instead of C:
My current installer.nsh file is:
Section
System::Call 'kernel32::GetFileAttributes(t "D:\")i .r0'
IntCmp $0 -1 NoDInstalled DriveDInstalled
NoDInstalled:
StrCpy $INSTDIR "$PROGRAMFILES\"
Goto ContinueInstallation
DriveDInstalled:
StrCpy $INSTDIR "D:\"
Goto ContinueInstallation
ContinueInstallation:
SetOutPath $INSTDIR
SectionEnd
I have a D: external drive connected to my computer and the default is still C:
Would love some help!
$InstDirin.onInit, not in aSection.IntCmp.$PROGRAMFILESIn real NSIS you would just
but since you are using electron I have no idea where you actually put this macro, the documentation is not clear if it is in installer.nsh or somewhere else. Their code makes it look like it should be somewhere else, you probably have to ask them directly for support if you can't figure it out yourself.