How can I make setup path only select drivers?
I only want install to path example " c:\abc " or "d:\abc" or "e:\abc" or "f:\abc".
7 posts
I only want install to path example " c:\abc " or "d:\abc" or "e:\abc" or "f:\abc".The following example should install on 'X:\abc'.
name 'test abc dir'
outfile 'test.exe'
showinstdetails show
page directory
page instfiles verify_abc
function .onInit
strcpy '$R0' '$SYSDIR' 3
strcpy '$INSTDIR' '$R0abc'
functionend
section -
Setoutpath '$INSTDIR'
# do what you have to do
Setoutpath '$INSTDIR\MyAPP'
# do what you have to do
Setoutpath '$INSTDIR\So Long'
# do what you have to do
sectionend
function verify_abc
strcpy '$R0' '$SYSDIR' 3
strcmp '$R0abc' '$INSTDIR' +3 +1
strcpy '$INSTDIR' '$R0abc'
messagebox mb_ok 'reseting output directory to $R0abc'
functionend
Cant U give .nis full example ?The above example is a full working one. Just copy/paste to editor's window and test it. If you like a more scriptable look :-) then define the default dir !define DEFAULT_DIR 'abc' and change the code according to the define ($R0abc becomes ${DEFAULT_DIR}. Just remember that, this example detects the system drive, if you plan to install on others, you should try GetDrives (Nsis Users Manual E.1.5 GetDrives).