中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

中国DOS联盟论坛
现在时间是 2026-07-04 21:29
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [已解决]注册表,右键菜单命令 查看 602 回复 2
楼 主 [已解决]注册表,右键菜单命令 发表于 2008-05-25 21:11 ·  中国 吉林 吉林市 电信
新手上路
积分 16
发帖 6
注册 2008-05-25 19:48
18年会员
UID 119686
性别 男
状态 离线
这是一个关于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


@="删除流文件"


@="streams.exe -s -d \"%1\">a.txt"



Windows Registry Editor Version 5.00


@="删除流文件"


@="streams.exe -s -d \"%1\">a.txt"





你们都是回答我的第一个帖子的人~~~~ 谢谢

[ Last edited by yht7891984 on 2008-5-26 at 10:36 AM ]
2 发表于 2008-05-25 23:54 ·  中国 陕西 西安 电信
铂金会员
★★★★
积分 5,212
发帖 2,478
注册 2007-02-08 23:39
19年会员
UID 79003
性别 男
状态 离线
>a.txt不是软件带的……

你要调用@="cmd /c streams.exe -s -d \"%1\">a.txt"
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore
3 发表于 2008-05-26 10:35 ·  中国 吉林 吉林市 电信
新手上路
积分 16
发帖 6
注册 2008-05-25 19:48
18年会员
UID 119686
性别 男
状态 离线
嗷嗷感谢slore!!!!!!

结贴!
论坛跳转: