Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 26th May 2016, 17:34   #1
parasoul
Senior Member
 
Join Date: Aug 2007
Posts: 117
Suppress "Error opening file for writing" Message from Script

How can one suppress the "Error opening file for writing" error message from the script?

It's not practical to suppress it by running the installer with the specific command line, I need to do it from within the script

Any way how?
parasoul is offline   Reply With Quote
Old 26th May 2016, 20:36   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,484
"SetOverwrite off" if the problem is a existing file.

Or you could try to see if you can write there first:
PHP Code:
Section
FileOpen 
$"x:\dummy" a
FileClose 
$0
StrCmp 
"" $+2
File 
"/oname=x:\dummy" "${__FILE__}"
SectionEnd 

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 27th May 2016, 22:15   #3
parasoul
Senior Member
 
Join Date: Aug 2007
Posts: 117
thanks!
parasoul 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