PendingFileRenameOperations和movefile工具

先看一下微软官方对PendingFileRenameOperations的解释:

Stores the names of files to be renamed when the system restarts.

This entry consists of pairs of file names. The file specified in the first item of the pair is renamed to match the second item of the pair. The system adds this entry to the registry when a user or program tries to rename a file that is in use. The file names are stored in the value of this entry until the system is restarted and they are renamed.

有点英文知识的应该能看懂这个意思,我就不再赘述。

pending的注册表项是HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Session Manager下键PendingFileRenameOperations。

movefile工具是用来编辑这个注册表项的。它的下载地址是:http://www.brothersoft.com/movefile-155209.html

movefile的用法是在cmd里切到movefile.exe的目录下下,运行movefile soursefilename destfilename。即可在注册表项里加入两个的文件的绝对路径。例如:

如果当前目录下存在1.txt 2.txt 3.txt 4.txt

输入如下:

movefile 1.txt ""

movefile 2.txt 3.txt

movefile 4.txt 5.txt

重启之后:

发现1.txt被删除,4.txt被改名为5.txt,但是2.txt和3.txt没有改变。由此可以发现当源文件和目的文件都存在的情况下,重启之后不执行重命名操作。如果执行重命名操作将可能会发生文件的覆盖,这种方案可以用于木马病毒等替换系统正常文件,但是经过我的多此测试,没有发生相关的事件。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值