Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I'm looking for a simple way to remove alterations to ini files made by viruses, e.g., in system.ini "shell=explorer.exe system.com" back to "shell=explorer.exe".
I can do it in a round about way with the "Find" command, but there must be a better way. I would appreciate help. Thanks.

I got in trouble last time I asked this, but here goes again...Do you have to do this using exclusively batch files? Can you do it in, say, perl? I wasn't even aware that batch files had file i/o capability. Even if you use a batch file to call a program written in another language???
I think today is my "useless response" day...I seem to be answering questions I don't know a direct answer to. My apologies, it should wear off by the end of the semester...Finals week and all that (must...keep....typing....)
-SN

Any language is okay with me. I just don't know any. I can't really find a way to do file I/O, just a work around with dos, using "Find" to write all lines except the one in question to a file, add the right line, then rename the file.

Mark:
Some assembly code could do it.
I show the code and you enter it using debug.com.
Here's my idea:
You will still be using "Find" but in stead
of you doing the job we make the process
automated just by entering the *.ini file to check and
a backup file to compare with (the renamed file, right?)I just need some time. If you can wait that long let me know.
MYXP

If you can be more specific in exactly what the program should find and replace, I can do it in perl.
-SN

I appreciate the friendly response. I found a freeware utility that does the trick, rewriting the entry no matter what the addition was. It's called ChangeINI, and if anyone is interested, it's here: http://elmo.winsite.com/bin/Info?500000027109

![]() |
Error checking for duplic...
|
Vb6 compile with Vb5 runt...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |