Replace
Replace Strings Within Files
Definition
Use this command to replace strings within a file.
This command searches and replaces a specific string
with a modified string; it does not replace lines like the NetInstall
command ModifyOEM. You cannot use wildcards
in the Search and Replace
with text boxes.
Please be careful when using this command with binary files; when you change a binary file (by replacing strings, for example) the eventually contained internal check sum may become invalid.
Settings
Input
Please enter the following specifications in this command's dialog box:
- File(s)
Enter the name of the files you want to modify. You can use wildcards in the same way as in DOS commands. Multiple entries must be separated by a blank. - Path
Enter the path to the files you want to change; the use of "\" is optional. - Search
Enter the string you want to search for; do not use wildcards! - Replace
with
Enter the string you want to use to replace the string in the Search box; do not use wildcards!
Options
The command dialog box contains the following two options:
Restrict
replacement to text files
Check this option if you want to restrict replacements to text files (recommended)
Automatically include
subdirectories
Check this option if you want to apply the command to all subdirectories
of the directory specified in the path statement.
Disable file redirection on x64 computers
For reasons of compatibilty, Ivanti DSM maps file and registry access to the default storage location for 32 bit applications (provided that the storage location differs from that of 64-bit applications). File access: whenever a 32-bit application attempts to access %windir%\System32, the access is redirected to %windir%\SysWOW64. Registry commands: when accessing HKEY_LOCAL_MACHINE\SOFTWARE the calls are redirected to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node. The x64-switch stops this redirection of file and registry accesses when running the script command on a x64 computer; the eScript command runs on the specified path. CallScript command: the script runs in a 64-bit process.