AndiG
22nd November 2001 12:16 UTC
Can't install to root?
See simple script below: NSIS doesn't let me install into the root directory, the "Install" button is grayed out until I enter a different path?!
Reason why I need this: I'd like to make an installer that does actually build an install script for making a backup of a selected directory and compiles it- and I'd sure like to backup the root drive :)
Name "Backup"
OutFile "BackupGen.exe"
Caption "Create Backup Script"
; Use Show to let user see directories that are scanned
ShowInstDetails Show
;ComponentText "Check he drives where you want the installer to scan for files." "" "Select drives to scan:"
InstallDir "C:\"
DirText "Select wich directory you want to backup:"
Section "Create Backup Script"
StrCpy $9 $INSTDIR
Ca;...
SectionEnd
FreeNsisTweaker
23rd November 2001 05:53 UTC
You'll need to change the InstallDir string in:
InstallDir "C:\ " ; So with a space behind C:\!
justin
23rd November 2001 06:58 UTC
The default logic is to not allow installs into root directories, primarily for safety reasons. Disabling this would be fairly easy but would require a reinstall. Perhaps I should add a config item to let you change that, but I dunno...
-Justin
P.S. for now, if you don't need the user to be able to select it, you can just not use $INSTDIR, and just use a variable instead...
AndiG2
24th November 2001 11:01 UTC
Thanks!
FreeNsisTweaker
7th December 2001 17:19 UTC
In the new versions (newer than 1.8b2) the option AllowRootDirInstall is added. That's what you need, I think!
AndiG2
7th December 2001 17:50 UTC
I've seen that, THANKS!
:)