Old 8th November 2006, 17:03   #1
asilverstein
Junior Member
 
Join Date: Oct 2006
Posts: 3
Exclamation 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
asilverstein is offline   Reply With Quote
Old 8th November 2006, 17:31   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
What's the complete error message? Sounds like you forgot to use SetOutPath.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 8th November 2006, 18:19   #3
asilverstein
Junior Member
 
Join Date: Oct 2006
Posts: 3
* 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.
asilverstein is offline   Reply With Quote
Old 8th November 2006, 18:31   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
If that's the error, $UPGRADE_PATH is empty. The error always displays the full path of the file it's trying to write.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 8th November 2006, 18:32   #5
asilverstein
Junior Member
 
Join Date: Oct 2006
Posts: 3
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.
asilverstein is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump