NETDI has the ability to search text files such as Autoexec.bat and Config.sys and insert or remove lines from them. It does this by using the following registry values in the registration section of your INF. The key name under the Ndi key is the name of the file to process. Each line to insert in this file is given a name (specified in the KeyOrder) value. For each line, you can insert or replace text in the file. Replacing a line with a null string effectively deletes the line.
NETDI executes these operations when it is committing changes to the disk.
Driver Sub Key | Value Name | Value | Description |
---|---|---|---|
Ndi\filename\Order | KeyOrder | list of line names | This is a list of names (subkeys under Ndi\filename) to process and the order to process the lines in. |
Ndi\filename\name | Line | line to insert | This string is the line to insert according to the specified search rules. |
Ndi\filename\name | Search | search pattern | The pattern to search in the file. Line will be placed before or after this line (determined by Position) For example, *ndis* searches for any line with ndis in it. |
Ndi\filename\name | Replace | replace string | Text to replace in the found line. For example, to replace net start with net stop, set Search to *net start* and Replace to *net stop*. |
Ndi\filename\name | Skip | search pattern | Do not process lines that match this pattern. |
Ndi\filename\name | Position | DWORD:position | Where to place the string in Line relative to the line found by the Search parameter: |
0 - insert at top of file or before the line | |||
1 - insert at end of file or after the line |