Now we want to replace certain things in the file. In this case we wat to REPLACE:
Code: Select all
Old="\\\\server1-9999\\Configurator$" mit dem String:
with:
NEW="\\\\%EmpirumServer%\\Configurator$"
The example shows the use of variables in the MPR.
Code: Select all
VAR\$$PAT=C:\Myfile.reg
VAR\$$OLD=\\\\server1-9999\\Configurator$
VAR\$$NEW=\\\\%EmpirumServer%\\Configurator$
RIF\$$PAT|$$OLD|$$NEW
END\
That is just a one-liner:
Code: Select all
' Import File into Registry
REG\$$PAT
Here's an example of a "quotes remover". All "are replaced by $sp$ (means spaces).
Code: Select all
' $ev4$ is the path where the compiled EXE is located.
VAR\$$PAT=$ev4$
' The NFF\ command looks for files with this specification in the specified path
NFF\$$PAT|*.txt
MBX\I could not find an ".txt" File!$crlf$Script ends.
GOTO enx
EFF\
' Here we do the REPLACE
VAR\$$FIL=$v1$
RIF\$$FIL|"|$sp$
@