ModifyOEMEx
Change Multiple Lines Within an OEM File
Definition
Use this command with ASCII and ANSI files to insert or delete multiple lines.
The command only uses wildcards (* and ?) when inserting or deleting multiple lines (without the restrictions that apply to DOS commands). You must specify the file name; other entries depend on the selected action.
You cannot use the AddINI, ModifyINI, ModifyOEM and ModifyOEMEx commands to share central files over a network.
If an error occurs while running the command, the script stops. If you want to continue the script if there is an error, enable the setting
Continue script despite error in the Script Editor.
Settings
Actions
You can select from four different actions:
- Insert line at beginning of file
- Add line to end of file
- Insert line in alphabetically ordered position
- Delete line from existing file
Options
The following options allow you to check if the
new line you want to insert is the equivalent of an already existing line
in the file. The lines are compared without blanks (
Example):
Insert
only the lines that are not in the existing file
Inserts only those lines that are not yet in the existing file.
Replace
existing lines in the existing file
Replaces the existing lines that are in the existing file.
Insert
lines whether they are already there or not
Always inserts the lines, whether they exist in the file or not.
Disable file redirection on x64 machines
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.
This file
has the syntax of a TCP/IP configuration file
By checking this option, you can define the file format.
TCP/IP configuration files have the following format:
ip 0 IP # Internet Protocol
icmp 1 ICMP # Internet Control Message Protocol
This file has a unique key in column 2 (= unique key column). When comparing the files the format will be checked as well:
- Commentary sections including # will be removed.
- Redundant blanks will be removed as described above. Tabs (#9) will be
replaced by blanks.
- The Installer checks for each line if it is identical.
- If a line is identical, the operation for this line is flagged as completed.
- If a line is not identical, the unique key column is checked. Depending
on the option you selected above, the process of overwriting is continued.
Example:
- Existing line 1: icmp 1 ICMP # Internet Control Message Protocol
- New line newprot 1 NEW # New Internet Protocol
Results:
Insert
only the lines that are not in the existing file + Column
for unique key = 2
Does not insert the line newprot...
.
Replace
existing lines in the existing file + Column
for unique key = 2
Replaces the line icmp... with the line
newprot... .
Replace line
Check the ModifyOEM command for more information on this option.