China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-04 14:17
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to use a batch file to prevent hard disk write operations? View 1,220 Replies 6
Original Poster Posted 2007-05-01 07:21 ·  中国 江苏 无锡 宜兴市 电信
中级用户
★★
Credits 487
Posts 212
Joined 2007-04-01 08:22
19-year member
UID 83597
Gender Male
Status Offline
I want to put together a process monitor implemented with a batch file.
The idea is this: make it start by itself at boot, and minimize to the taskbar, call the virus processes listed in a TXT file, automatically check process status, and output a report with details of each process. Once it finds a process matching a virus process in the TXT file, it pops up a system tray balloon saying there is a suspicious or virus process. The TXT file should support custom updates of virus processes.
At the same time, I also hope this tool can have the function of disabling hard disk writes, and a function to restore it.

cacls C:windowssystem32 /G administrator:R Prevent modifying and writing to the C:windowssystem32 directory
cacls C:windowssystem32 /G administrator:F Restore modifying and writing to the C:windowssystem32 directory
cacls C: /G administrator:R Prevent modifying and writing to drive C
cacls C: /G administrator:F Restore modifying and writing to drive C

I hope an expert can help implement this. I think the system tray balloon can be done with a batch file, so the rest should also be possible, right?
Sorry to trouble everyone! Thanks in advance!
Floor 2 Posted 2007-05-01 13:26 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
An NTFS system can be set that way... check the parameters of CACLS.


As for the balloon, look for my thread...
Floor 3 Posted 2007-05-01 18:11 ·  中国 江苏 无锡 电信
中级用户
★★
Credits 487
Posts 212
Joined 2007-04-01 08:22
19-year member
UID 83597
Gender Male
Status Offline
Thanks to the friend in reply #2 for answering. I have that tray balloon tool of yours, but I still don't understand the details.. Please explain, thanks!~
estTrayTip.exe C:\Windows\System32\acwizard.ico What are you looking at? Never seen a batch file before? Never seen taskbar balloon info before? Now you've seen it, right? Since you've seen it, bump electronixtar's thread. 2
:Explanation of the exe parameters: estTrayTip.exe icon path title content prompt icon type Error, Info, None, Warning, here 2=Info. Every parameter must be filled in correctly
>nul ping 127.1 -n 1
Floor 4 Posted 2007-05-04 11:13 ·  中国 浙江 杭州 阿里云
初级用户
Credits 26
Posts 11
Joined 2007-04-30 02:33
19-year member
UID 86974
Gender Male
Status Offline
Damn it  !!!
I used the command "cacls C: /G administrator:R Prevent modifying and writing to drive C" and it disabled all drives!
Now using "cacls C: /G administrator:F Restore modifying and writing to drive C" can't restore it 
It still says access denied!!!
Please, experts, give me some guidance!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Floor 5 Posted 2007-05-05 18:10 ·  中国 江苏 无锡 宜兴市 电信
中级用户
★★
Credits 487
Posts 212
Joined 2007-04-01 08:22
19-year member
UID 83597
Gender Male
Status Offline
Depressing, how am I supposed to make this work? This code seems unable to work on my machine... sigh... I'll help bump this again, hope more people see it and come help you...
Floor 6 Posted 2007-05-05 18:35 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
Floor 7 Posted 2007-05-06 19:35 ·  中国 江苏 无锡 电信
中级用户
★★
Credits 487
Posts 212
Joined 2007-04-01 08:22
19-year member
UID 83597
Gender Male
Status Offline
Thanks to the friend in reply #6, I've already replied in your thread!~
Forum Jump: