asilverstein
8th November 2006 18:03 UTC
Need help urgently - "error opening file for writing"
Hello All,
My first post here, and I am in a bind.
When installing files to an empty directory which already exists, NSIS throws the error ""error opening file for writing" for every single file.
I have tried:
SetOverwrite on
Also, I tried:
AccessControl::GrantOnFile "$INSTDIR" "Everyone" "FullAccess"
These don't fix the problem. Is there any solution to this issue?
-Alex
kichik
8th November 2006 18:31 UTC
What's the complete error message? Sounds like you forgot to use SetOutPath.
asilverstein
8th November 2006 19:19 UTC
* Code looks like this:
SetOverwrite on
SetOutPath $UPGRADE_PATH
DetailPrint "Skipping Info.mdb for upgrade."
File /r /x "Info.mdb" "..\Files\*.*"
* Complete error message is:
"Error opening file for writing:"
\Data\Guide.mdb
Click Abort to stop the installation,
Retry to try again, or
Ignore to skip this file.
kichik
8th November 2006 19:31 UTC
If that's the error, $UPGRADE_PATH is empty. The error always displays the full path of the file it's trying to write.
asilverstein
8th November 2006 19:32 UTC
I think I found my bug - $UPGRADE_PATH was empty, so there was nowhere to output the files to. Thanks for your assistance, it led me to find the answer I needed.