DarkLord23
20th February 2002 09:23 UTC
How can we install to c:\dir ????
Hello,
I would like to propose the following dir for my installation:
C:\econf
where c:\ is the system dir (so I could be d:\ for a multiboot OS, etc.)
I have seen this function:
StrCpy $0 $WINDIR 2
But I can't call it from the install dir ... (no section)
Could u help?
Smile2Me
20th February 2002 14:09 UTC
Hi DarkLord23
Is this what you want to do?
StrCpy $0 $WINDIR 2
InstallDir "$0\econf"
Good luck.
Greetz, Hendri.
DarkLord23
26th February 2002 13:44 UTC
I does't work ;(
StrCpy $0 "$WINDIR" (2) ()
Error: Can't add entry, no section or function is open!
Error in script "C:\release\econf.nsi" on line 50 -- aborting creation process
Smile2Me
26th February 2002 15:28 UTC
So you can only use this command StrCpy in a SECTION or a FUNCTION. Please read NSIS Documentation.
-Hn3.
DarkLord23
26th February 2002 16:41 UTC
I know that and I've read the doc.
I have tried to declare windir in the onInitSuccess function but it does not work either!
I am stuck!!
Smile2Me
26th February 2002 17:10 UTC
You shouldn't declare $WINDIR. It's given.
Just do:
function .onInit
StrCpy $0 $WINDIR 2
; Now $0 is the system drive
StrCpy $INSTDIR "$0\MyApp"
; this is to set the default install dir
; to the right choice.
FunctionEnd
Section
File...
SectionEnd
-Hendri.