Archive: System drive


System drive
Hi,

How can I specify the system drive (sometimes, it's not C:)

For instance, if I want c:\MyProg :
InstallDir $SYSTEMDRIVE\MyProg


Copy the first chars from $WINDIR.


StrLen $R0 $WINDIR
StrCpy $R0 $WINDIR 1 -$R0

$R0 = e.g. C or D

-Stu


You don't need StrLen. StrCpy with 1 as maxlen is enough.

StrCpy $R0 $WINDIR 1


It should be a instruction for this... /* hint hint */
Something like $WINDRIVE....


Originally posted by kichik
You don't need StrLen. StrCpy with 1 as maxlen is enough.

StrCpy $R0 $WINDIR 1
Ah thanks Kichik, I forgot about that :D

-Stu

Thank you very much.
I think a variable $SYSTEMDRIVE should be useful


http://nsis.sourceforge.net/site/ind...5&tx_faq_faq=7

You can easily declare your own variable called $SYSTEMDRIVE and set it using one line of code.


But I'll be easier if already was made :p


If we add everything that can be done with a few lines code NSIS will become huge.


In fact it was because I come from Innosetup where there is a {sd} constant