Yathosho
22nd October 2002 18:16 UTC
Error
i got a very simple script, using no strings until the first section, the first command there is:
FileOpen $0 "file.txt" r
when i compile the the installer, i get the following error message
Invalid command: FileOpen $0 "file.txt"
Error in script "test.nsi" on line 21 -- aborting creation process
i have no clue why that is. there's no other string used in the script until that position.
sdbarker
22nd October 2002 19:18 UTC
Perhaps try another register other than $0. I know there were previously problems use ReadRegStr with $0
-Scott
Yathosho
22nd October 2002 21:40 UTC
thanks for the tip, but the error remains
Joost Verburg
23rd October 2002 19:52 UTC
Works fine here. Please use the latest CVS version.
Yathosho
24th October 2002 09:33 UTC
i constantly updated my nsis, but i always had this error (actually i posted this some months ago).
Name "test"
>OutFile test.exe
CRCCheck on
XPStyle on
>#InstallDir "$PROGRAMFILES\test"
>DirText "Select a target directory."
>DirShow show
SetCompress force
InstType Standard
Section "Required Components"
>FileOpen $R1 "file.txt" r
loop:
>FileRead $R1 $R2
IfErrors done
MessageBox MB_OK $R2
Goto loop
done:
Exit
>Section End
>
the odd thing is, that it claims "FileOpen" to be an invalid command
Invalid command: FileOpen $R1 "file.txt"
Error in script "C:\_dirdupe\test.nsi" on line 14 -- aborting creation process
kichik helped me with this script a while ago. he also could compile it. i'm running win xp, if that helps.
Joost Verburg
24th October 2002 13:09 UTC
There are two other bugs in your script. Does the attached script work?
Yathosho
24th October 2002 21:28 UTC
thanks, that worked. what not worked, i replaced the messagebox with the createdirectory command. got a clue why that is?
Yathosho
28th October 2002 12:23 UTC
anyone an idea?
Joost Verburg
28th October 2002 14:18 UTC
I don't understand what you mean. Please give a better description.
Yathosho
28th October 2002 23:05 UTC
you see the pasted script of mine above. when i replace 'MessageBox' with 'CreateDirectory', the compiled exe does not create the directories or creates a maximum of one (that depends on the given text file). the purpose of the program is to create empty directories, names gotten from a text file. i only used messagebox before, to see if it generally works properly, which it does unless i replace it with createdirectories.