Outfile test.exe
Var File1
Var File2
RequestExecutionLevel user
Section "Main"
SetOutPath "EXEDIR"
FileOpen "$File1" "$EXEDIR\test1.txt" w
StrCpy "$File2" "$EXEDIR\test2.txt"
FileWrite "$File2" "Hello World"
FileClose "$File1"
SectionEnd Why is the File test1.txt altered? FileWrite is referring to the wrong handle.Possible Bug in File Handling
This Code deletes the content of the File test1.txt if it existed before. I noticed this because of a typo in one of my scripts. Tested with v.2.45 on Vista SP2 64Bit and XP SP3