标题: [已解决]注册表,右键菜单命令
[打印本页]
作者: yht7891984
时间: 2008-5-25 21:11
标题: [已解决]注册表,右键菜单命令
这是一个关于NTFS流文件删除的软件Streams.exe MS出品。仅有命令行模式。
写了一个右键菜单命令直接调用。如下。
问题是不知道弹出的dos窗口里面的内容是什么,而且输出重定向后的a.txt在当前目录和system32下都找不到。 尝试搜索,没有找到该文件。
批处理代码如下
::echo off
cls
if exist %windir%\system32\streams.exe (
title 卸载中..
REG DELETE "HKCR\Directory\shell\DelStreams" /f >nul
REG DELETE "HKCR\*\shell\DelStreams" /f >nul
del %windir%\system32\streams.exe /q /f > nul >nul
title 卸载成功
) else (
title 安装中..
copy streams.exe %windir%\system32\streams.exe >nul
REG ADD "HKCR\Directory\shell\DelStreams" /ve /d "删除流文件" /f >nul
REG ADD "HKCR\Directory\shell\DelStreams\command" /ve /d streams.exe" "-s" "-d" \"%%1""">a.txt" /f >nul
REG ADD "HKCR\*\shell\DelStreams" /ve /d "删除流文件" /f >nul
REG ADD "HKCR\*\shell\DelStreams\command" /ve /d streams.exe" "-s" "-d" \"%%1""">a.txt" /f >nul
title 安装成功
)
注册表内的值是
streams.exe -s -d "%1">a.txt
另外附上从注册表里导出的内容
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\DelStreams]
@="删除流文件"
[HKEY_CLASSES_ROOT\Directory\shell\DelStreams\command]
@="streams.exe -s -d \"%1\">a.txt"
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\DelStreams]
@="删除流文件"
[HKEY_CLASSES_ROOT\*\shell\DelStreams\command]
@="streams.exe -s -d \"%1\">a.txt"
你们都是回答我的第一个帖子的人~~~~ 谢谢
[
Last edited by yht7891984 on 2008-5-26 at 10:36 AM ]
作者: slore
时间: 2008-5-25 23:54
>a.txt不是软件带的……
你要调用@="cmd /c streams.exe -s -d \"%1\">a.txt"
作者: yht7891984
时间: 2008-5-26 10:35
嗷嗷感谢slore!!!!!!
结贴!