[FileWriteN] is used for when you need to write something to the app's own files to properly implement portability. Generally speaking if you are performing a FileWrite on a file it should be somewhere within \Data (there are exceptions, but they are rare).
Some use cases for FileWrite:
Modifying paths stored in a config file that need to be handled as the drive/folder changes
Writing the language setting to a config file when implementing Platform-based language switching
Setting a default path on first run that requires a PAL environment variable
Forcing a setting to always be off for an app where it breaks portability (start with Windows, automatically associate filetypes, automatically update, etc.)
Thanks for answering.
So is that mean the launcher will search for some words in the ini file's text and take action, for example, replacing the words?
Depending on what you set the Type= value to depends on what it does exactly.
XML attribute and XML text are (obviously) specifically for updating attributes and text nodes in XML files using the XPath entry to determine where you are targeting, and replacing the attribute or node with the value you pass.
INI is specifically for files with a .ini style formatting (doesn't actually have to be called x.ini, though) where it has one or more [Sections] and within each section are lines of the format Key=Value. This will replace the value of the key with whatever you pass it.
ConfigWrite is like INI, but is less strict. It simply looks for any line beginning with what you pass it in the Entry=X parameter, and modifies the rest of the line to the value you pass it.
Replace seems to be the more commonly used type, and it simply looks for the existence of a string and replaces it with what you pass as a value.
[FileWriteN] is used for when you need to write something to the app's own files to properly implement portability. Generally speaking if you are performing a FileWrite on a file it should be somewhere within \Data (there are exceptions, but they are rare).
Some use cases for FileWrite:
Thanks for answering.
So is that mean the launcher will search for some words in the ini file's text and take action, for example, replacing the words?
Depending on what you set the
Type=
value to depends on what it does exactly.XML attribute
andXML text
are (obviously) specifically for updating attributes and text nodes in XML files using theXPath
entry to determine where you are targeting, and replacing the attribute or node with the value you pass.INI
is specifically for files with a .ini style formatting (doesn't actually have to be called x.ini, though) where it has one or more[Sections]
and within each section are lines of the formatKey=Value
. This will replace the value of the key with whatever you pass it.ConfigWrite
is likeINI
, but is less strict. It simply looks for any line beginning with what you pass it in theEntry=X
parameter, and modifies the rest of the line to the value you pass it.Replace
seems to be the more commonly used type, and it simply looks for the existence of a string and replaces it with what you pass as a value.