Suppress "Error opening file for writing" Message from Script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • parasoul
    Senior Member
    • Aug 2007
    • 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?
  • Anders
    Moderator
    • Jun 2002
    • 5643

    #2
    "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

    Comment

    • parasoul
      Senior Member
      • Aug 2007
      • 117

      #3
      thanks!

      Comment

      Working...
      X