Computing.Net > Forums > Programming > Altering ini files from batch

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Altering ini files from batch

Reply to Message Icon

Name: Mark
Date: December 3, 2003 at 14:09:03 Pacific
OS: NA
CPU/Ram: NA
Comment:

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.



Sponsored Link
Ads by Google

Response Number 1
Name: SN
Date: December 3, 2003 at 17:34:47 Pacific
Reply:

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


0

Response Number 2
Name: Mark
Date: December 4, 2003 at 06:13:28 Pacific
Reply:

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.


0

Response Number 3
Name: myxp
Date: December 4, 2003 at 16:15:01 Pacific
Reply:

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


0

Response Number 4
Name: SN
Date: December 4, 2003 at 17:43:05 Pacific
Reply:

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


0

Response Number 5
Name: Mark
Date: December 5, 2003 at 08:28:10 Pacific
Reply:

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


0

Related Posts

See More



Response Number 6
Name: SN
Date: January 4, 2004 at 20:35:58 Pacific
Reply:

<code>
This text is red
</code>

[code]
This text is red
[/code]


0

Sponsored Link
Ads by Google
Reply to Message Icon

Error checking for duplic... Vb6 compile with Vb5 runt...



Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Altering ini files from batch

Call local html file from batch file www.computing.net/answers/programming/call-local-html-file-from-batch-file/1186.html

Log file from Batch File www.computing.net/answers/programming/log-file-from-batch-file/15308.html

Parse regsitry file from batch www.computing.net/answers/programming/parse-regsitry-file-from-batch/11151.html