Announcement

Collapse
No announcement yet.

How to append txt file if other file present

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to append txt file if other file present

    Version 5.0.1.6: I followed instructions to append to a text file if another file existed. However, it seems to append whether the other file exists or not. Parameters:
    File Search Variable
    Name=%SearchVar%
    Default Value=null (also tried FALSE)
    File to search for=wininsp.exe
    Priority search path=%AppDir%\bin (location of wininsp.exe)
    Look in=Priority search path only
    Store this in variable=TRUE
    Valid CRC-32 Value=1214869675

    System Editor
    Text File
    Action=Add line to end of file
    Full path & filename=%AppDir%\bin\hms.ini
    Add/append text=Purchased
    Condition
    Value A=%SearchVar%
    Operator= =
    Value B=TRUE

    Please advise. Thanks!

  • #2
    Re: How to append txt file if other file present

    Hi,

    I tested this out on my system and it worked properly. Are you sure that you are saving the INI file properly? Perhaps you are not running the current build?

    Try setting the default for %SearchVar% to FALSE, and then adding %SearchVar% to the text of all of your screens. What is %SearchVar% being set to? TRUE or FALSE?

    Then try storing the "Full Path" in %SearchVar%, and re-build and run your installation. Now what is %SearchVar% being set to? Do the changes still get made to your INI file?

    mark.
    MSI Factory The Next Generation Intelligent Setup Builder

    Comment


    • #3
      Re: How to append txt file if other file present

      Hi,

      Your two actions appear to be correct, so I'm not sure why this is not working. Are you sure that %SearchVar% is not being set to FALSE or TRUE somewhere else in your menu? You could try putting %SearchVar% as the text on all of your screens to test what the value of %SearchVar% is as you progress through your installation.

      If you are still having problems you can e-mail your project file to: [email protected] .

      mark.
      MSI Factory The Next Generation Intelligent Setup Builder

      Comment

      Working...
      X