Essentially my problem is locating if one or both strings exist, if they do delete them, then insert the text from the textbox.
I need to search the autoexec.bat for two strings.
SET COMPUTERNAME = something
SET USERNAME = something
If either one of these is found delete them, then insert the text from a texbox that contains:
SET COMPUTERNAME = %computername
SET USERNAME = %username
I can read the computername into a variable, and the username into a variable and then place the above statement into a textbox. I also have the autoexec.bat into a rtf box. I am using the Commondialog to retrieve the filename, place it into the rtf box, and then use the CommonDialog to save the file.