|
baomaboy
银牌会员
    
积分 1513
发帖 554
注册 2005-12-30
状态 离线
|
  『楼 主』:
管理”新建“菜单中的文件类型→VBS版
使用 LLM 解释/回答一下
①删除右键菜单”新建“中的垃圾,如:公文包。
②添加新类型到”新建“菜单中,如:批处理、VBS、或其他。
③支持批量操作,并且可以自定义(删除/添加)批量操作的扩展名。
最初在操作Office系列扩展名时由于其注册表值不在常规位置,所有操作失败,后来修改了下可以操作了,如果还有哪个文件类型(扩展名)不能操作请自行修改注册表,也请您告知我下,谢谢!
目前收集到批量操作的扩展名如下:
将删除:bmp.wav.ais.fla.bbp.psd.rar.zip.bfc.mp3.doc.xls.mdb.ppt.nit.rgs.x3d.ctm.uga.t3d.loc.kpg.sip.aep.nfs.srg.tpc.tbt.smv.rsnp
将添加:txt.reg.inf.bat.vbs.js.ini
Rem 想删除新建菜单中的文件类型则按上面的格式添加到第一行中,只要求格式行号正确可在任意位置插入。
Rem 想添加新建菜单中的文件类型则按上面的格式添加到第二行中,只要求格式行号正确可在任意位置插入。
Rem bfc:Windows的公文包文件
Last edited by baomaboy on 2007-3-17 at 06:48 AM ]
①Delete the garbage in the "New" option of the right - click menu, such as: Briefcase.
②Add new types to the "New" menu, such as: Batch processing, VBS, or others.
③Support batch operations, and can be customized (delete/add) the extensions of batch operations.
Initially, when operating the Office series extensions, since their registry values were not in the regular position, all operations failed. Later, after making some modifications, it can be operated. If there are still any file types (extensions) that cannot be operated, please modify the registry by yourself, and also please inform me, thank you!
The extensions collected for batch operations are as follows:
To be deleted: bmp.wav.ais.fla.bbp.psd.rar.zip.bfc.mp3.doc.xls.mdb.ppt.nit.rgs.x3d.ctm.uga.t3d.loc.kpg.sip.aep.nfs.srg.tpc.tbt.smv.rsnp
To be added: txt.reg.inf.bat.vbs.js.ini
Rem To delete the file types in the New menu, add them to the first line in the above format. Only the format line number needs to be correct and it can be inserted at any position.
Rem To add the file types in the New menu, add them to the second line in the above format. Only the format line number needs to be correct and it can be inserted at any position.
Rem bfc: Windows Briefcase file
Last edited by baomaboy on 2007 - 3 - 17 at 06:48 AM ]
此帖被 +12 点积分 点击查看详情 评分人:【 lxmxn 】 | 分数: +10 | 时间:2007-3-17 09:55 | 评分人:【 Wingl83 】 | 分数: +2 | 时间:2008-10-19 13:15 |
|
附件
1: Manage_New.rar (2007-3-17 06:40, 6.79 KiB,下载次数: 157)
附件
2: 未命名.GIF (2007-3-17 06:40, 5.87 KiB,下载次数: 15)
|
|
2007-3-17 06:40 |
|
|
vkill
金牌会员
     
积分 4103
发帖 1744
注册 2006-1-20 来自 甘肃.临泽
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
告诉我注册表的位置在哪那?
Where is the location of the registry?
|
|
2007-3-17 06:55 |
|
|
baomaboy
银牌会员
    
积分 1513
发帖 554
注册 2005-12-30
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
Originally posted by vkill at 2007-3-17 06:55:
告诉我注册表的位置在哪那?
通常都在:
HKCR\.扩展名\ShellNew\NullFile
而office系列则在:
HKCR\.doc\Word.Document.8\ShellNew\NullFile
并且由于office版本不同Word.Document.8也不同。
Originally posted by vkill at 2007-3-17 06:55:
Where is the location of the registry?
Usually it is:
HKCR\.extension\ShellNew\NullFile
And for Office series, it is:
HKCR\.doc\Word.Document.8\ShellNew\NullFile
And because of different Office versions, Word.Document.8 is also different.
|
|
2007-3-17 07:01 |
|
|
chengbiner
初级用户
 
积分 105
发帖 44
注册 2006-10-5
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
那个知道怎么在那有个“新建公文包”啊?
Who knows how to find the "New Briefcase" there?
|
|
2007-3-17 11:22 |
|
|
baomaboy
银牌会员
    
积分 1513
发帖 554
注册 2005-12-30
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
Originally posted by chengbiner at 2007-3-17 11:22:
那个知道怎么在那有个“新建公文包”啊?
没看明白你的意思,我理解为你想让新建菜单中出现新建公文包,
添加.bfc就行了。
Last edited by baomaboy on 2007-3-17 at 11:30 AM ]
Originally posted by chengbiner at 2007-3-17 11:22:
Who knows how to have a "New Briefcase" there?
I didn't understand your meaning clearly. I understand that you want the New menu to have New Briefcase,
Add .bfc.
Last edited by baomaboy on 2007-3-17 at 11:30 AM ]
附件
1: 1.GIF (2007-3-17 11:30, 12.88 KiB,下载次数: 187)
附件
2: 2.GIF (2007-3-17 11:30, 17.66 KiB,下载次数: 1)
|
|
2007-3-17 11:25 |
|
|
kich
中级用户
  
积分 397
发帖 168
注册 2006-10-8
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
发一下原代码怎么样?
slore的解密代码,我这运行说有错误!!
Can you send the original code? The decryption code of slore, I get an error when running it here!!
|
|
2007-4-13 01:38 |
|
|
bjsh
银牌会员
    
积分 2000
发帖 621
注册 2007-1-1
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
强烈建议 baomaboy兄;
以后再发布东西的时候不要给源码加密;
也给我们学习一下吗
Strongly suggest brother baomaboy;
Don't encrypt the source code when releasing things in the future;
Also let us learn something, okay
|
|
2007-4-13 02:21 |
|
|
baomaboy
银牌会员
    
积分 1513
发帖 554
注册 2005-12-30
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
Originally posted by bjsh at 2007-4-13 02:21:
强烈建议 baomaboy兄;
以后再发布东西的时候不要给源码加密;
也给我们学习一下吗
这个帖子是近一个月前的了 后来发的都是未加密的
Originally posted by bjsh at 2007-4-13 02:21:
Strongly suggest that brother baomaboy;
Do not encrypt the source code when releasing things in the future;
Also let us learn
This post is from nearly a month ago. The ones posted later are all unencrypted.
|

好多菩提树,好多明镜台。本来好多物,好多的尘埃。 |
|
2007-4-13 03:05 |
|
|
baomaboy
银牌会员
    
积分 1513
发帖 554
注册 2005-12-30
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
①由于新建VBS模版的原因,代码中会有多于的代码 (无用代码),更由于我懒而没删除,大家凑合看吧。
②基础差,没好的编码习惯,想到那写到哪,所以可能有捷径的代码我用了很曲折的方法,还是由于懒没有改写。
我的目的就是,可以学习到方法和技巧,并可以使用,至于美化格式,精简代码,等我有时间和精力时也许会那么做 。所以 希望大家不要扔鸡蛋啊 ,最初加密就是怕大家砸我 ^_^。
Dim WshSHell,FSO
On Error Resume Next
Set WshSHell = WScript.CreateObject("WScript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set WinVer = WshSHell.Environment("Process")
Set Args = WScript.Arguments
CloseTime = 5
FileName = WScript.ScriptName
FileFullName = WScript.ScriptFullName
FilePath = FSO.GetParentFolderName(FileFullName)
InsPath = FSO.GetSpecialFolder(1)
InsFullName = FSO.BuildPath(InsPath ,FileName)
LnkPathNT = WshSHell.SpecialFolders(2)
LnkPath9X = WshSHell.SpecialFolders(14)
LnkPathAll = WshSHell.SpecialFolders("SendTo")
OtherFileName="Manage_New.txt"
OtherFilePath=FSO.GetSpecialFolder(1)
TemFileName="无标题"
TemFilePath=FSO.GetSpecialFolder(2)
Copyright="玲珑科技"
QQ="QQ:25926183"
Email="Email:fty1995@163.com"
InsTitle="Manage_New"
InsAnswer="添加/删除新建菜单"
RegPath1="HKEY_CLASSES_ROOT\Directory\shell\Manage_New\"
RegValue1="添加/删除新建菜单"
RegForm1="REG_SZ"
RegPath2="HKEY_CLASSES_ROOT\Directory\shell\Manage_New\command\"
RegValue2="wscript.exe "&InsFullName
RegForm2="REG_SZ"
RegPath3="HKEY_CLASSES_ROOT\*\shell\Manage_New\"
RegValue3="添加/删除新建菜单"
RegForm3="REG_SZ"
RegPath4="HKEY_CLASSES_ROOT\*\shell\Manage_New\command\"
RegValue4="wscript.exe "&InsFullName
RegForm4="REG_SZ"
WshSHell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.cpl\Application","control.exe","REG_SZ"
IF FileFullName <> InsFullName then
intAnswer = MsgBox("【是】将“"+ InsAnswer +"”加入到右键菜单,"&Chr(10)&Chr(10)&"【否】将“"+ InsAnswer +"”从右键菜单删除。 ", vbQuestion + vbYesNoCancel, "安装 - "+ InsTitle +" - "+ Copyright)
If intAnswer = vbYes Then
WshSHell.RegWrite RegPath1,RegValue1,RegForm1
WshSHell.RegWrite RegPath2,RegValue2,RegForm1
WshSHell.RegWrite RegPath3,RegValue3,RegForm3
WshSHell.RegWrite RegPath4,RegValue4,RegForm4
FSO.GetFile(FileFullName).Copy(InsFullName)
Call Install
WshSHell.popup _
"添加脚本文件:"+chr(10)+InsFullName+chr(10)+chr(10)+ _
"添加注册表项:"+chr(10)+chr(34)+ RegPath3 +chr(34)+chr(10)+chr(34)+ RegPath1 +chr(34)+chr(10)+ _
chr(10) & CloseTime & " 秒钟后本窗口将自动关闭!" +chr(10)+chr(10)+ _
chr(10) & "Copyright(C) " + Copyright +" " & QQ &" " + Email _
, CloseTime, "安装成功 - "+ InsTitle +" - "+ Copyright, 0 + 64
end if
If intAnswer = vbNo Then
WshSHell.RegDelete RegPath4
WshSHell.RegDelete RegPath3
WshSHell.RegDelete RegPath2
WshSHell.RegDelete RegPath1
FSO.DeleteFile InsFullName
WshSHell.popup _
"删除脚本文件:"+chr(10)+InsFullName+chr(10)+chr(10)+ _
"删除注册表项:"+chr(10)+chr(34)+ RegPath3 +chr(34)+chr(10)+chr(34)+ RegPath1 +chr(34)+chr(10)+ _
chr(10) & CloseTime & " 秒钟后本窗口将自动关闭!" +chr(10)+chr(10)+ _
chr(10) & "Copyright(C) " + Copyright +" " & QQ &" " + Email _
, CloseTime, "卸载成功 - "+ InsTitle +" - "+ Copyright, 0 + 64
end if
If intAnswer = vbCancel Then
end if
ELSE
FileExName=Inputbox("1.添加扩展名到新建:(加‘.’在扩展名前)"&chr(10)&chr(10)&"2.删除扩展名从新建:(没‘.’只输扩展名)"&chr(10)&chr(10)&_
"3.输入‘25926183’可自定义默认的扩展名"&chr(10)&chr(10)&"或执行对全部默认扩展名添加和删除操作。"_
,"输入扩展名 - "&Copyright&" - QQ:25926183","bmp")
if FileExName=chr(50)&chr(53)&chr(57)&chr(50)&chr(54)&chr(49)&chr(56)&chr(51) Then
intAnswer = MsgBox("【是】将对所有自定义扩展名进行删除和添加,"&Chr(10)&Chr(10)&"【否】将打开扩展名自定义文件手工修改保存。", vbQuestion + vbYesNoCancel, "安装 - "+ InsTitle +" - "+ Copyright)
If intAnswer = vbYes Then
Set ReadFile = FSO.OpenTextFile(FSO.BuildPath(OtherFilePath ,OtherFileName), 1)
ReadLineTextFile=ReadFile.ReadLine
ReadFile.Close
DelNameStrc=ReadLineTextFile
n=len(DelNameStrc)
temp=0
for Tem = 1 to n
if mid(DelNameStrc,Tem,1)="." then
temp=temp+1
end if
next
for i= 1 to temp+1
ni=InStrRev(DelNameStrc,".",n)
mrname=mid(DelNameStrc,ni+1,n-ni)
FileExName="."&mrname
PiaoYi=WshSHell.RegRead("HKCR\" & FileExName & "\")
WshSHell.RegDelete "HKCR\" & FileExName & "\"&PiaoYi&"\ShellNew\"
WshSHell.RegDelete "HKCR\" & FileExName & "\ShellNew\"
n=ni-1
next
Set ReadFile = FSO.OpenTextFile(FSO.BuildPath(OtherFilePath ,OtherFileName), 1)
ReadFile.SkipLine
ReadLineTextFile=ReadFile.ReadLine
ReadFile.Close
AddNameStrc=ReadLineTextFile
n=len(AddNameStrc)
temp=0
for Tem = 1 to n
if mid(AddNameStrc,Tem,1)="." then
temp=temp+1
end if
next
for i= 1 to temp+1
ni=InStrRev(AddNameStrc,".",n)
mrname=mid(AddNameStrc,ni+1,n-ni)
FileExName="."&mrname
PiaoYi=WshSHell.RegRead("HKCR\" & FileExName & "\")
WshSHell.RegWrite "HKCR\" & FileExName & "\ShellNew\NullFile","","REG_SZ"
WshSHell.RegWrite "HKCR\" & FileExName & "\"&PiaoYi&"\ShellNew\NullFile","","REG_SZ"
n=ni-1
next
WshShell.popup chr(10) &_
"自动在新建菜单中添加/删除文件类型成功。"+ chr(10) &chr(10)&chr(10) & _
"个别扩展名ShellNew键漂移会操作不成功,则打开注册表手工查找修改。"+ chr(10) &chr(10) & _
chr(10) & CloseTime & " 秒钟后本窗口将自动关闭!" +chr(10)+chr(10)+ _
chr(10) & "Copyright(C) " + Copyright +" " & QQ &" " + Email _
, CloseTime, "添加/删除新建菜单文件类型 - "+ InsTitle +" - "+ Copyright, 0 + 64
end if
If intAnswer = vbNo Then
WshSHell.Run ("Notepad.exe "&FSO.BuildPath(OtherFilePath ,OtherFileName))
end if
else
If FileExName<>"" Then
if left(FileExName,1)="." then
WshSHell.RegWrite "HKCR\" & FileExName & "\ShellNew\NullFile","","REG_SZ"
PiaoYi=WshSHell.RegRead("HKCR\" & FileExName & "\")
WshSHell.RegWrite "HKCR\" & FileExName & "\"&PiaoYi&"\ShellNew\NullFile","","REG_SZ"
WshShell.popup chr(10) &_
"在新建菜单中添加 ‘ "&FileExName&" ’ 文件成功。"+ chr(10) &chr(10)&chr(10) & _
"个别扩展名ShellNew键漂移会操作不成功,则打开注册表手工查找修改。"+ chr(10) &chr(10) & _
chr(10) & CloseTime & " 秒钟后本窗口将自动关闭!" +chr(10)+chr(10)+ _
chr(10) & "Copyright(C) " + Copyright +" " & QQ &" " + Email _
, CloseTime, "添加新建菜单文件类型 - "+ InsTitle +" - "+ Copyright, 0 + 64
else
FileExName="."&FileExName
PiaoYi=WshSHell.RegRead("HKCR\" & FileExName & "\")
WshSHell.RegDelete "HKCR\" & FileExName & "\"&PiaoYi&"\ShellNew\"
WshSHell.RegDelete "HKCR\" & FileExName & "\ShellNew\"
WshShell.popup chr(10) &_
"从新建菜单中删除 ‘ "&FileExName&" ’ 文件成功。"+ chr(10) &chr(10)&chr(10) & _
"个别扩展名ShellNew键漂移会操作不成功,则打开注册表手工查找修改。"+ chr(10) &chr(10) & _
chr(10) & CloseTime & " 秒钟后本窗口将自动关闭!" +chr(10)+chr(10)+ _
chr(10) & "Copyright(C) " + Copyright +" " & QQ &" " + Email _
, CloseTime, "删除新建菜单文件类型 - "+ InsTitle +" - "+ Copyright, 0 + 64
end if
else
end if
end if
End if
Set WshSHell = Nothing
Set FSO = Nothing
Set Args = Nothing
WScript.Quit(0)
Sub Install()
Set NewFile = FSO.CreateTextFile(FSO.BuildPath(OtherFilePath ,OtherFileName), True)
NewFile.WriteLine("bmp.wav.ais.fla.bbp.psd.rar.zip.bfc.mp3.doc.xls.mdb.ppt.nit.rgs.x3d.ctm.uga.t3d.loc.kpg.sip.aep.nfs.srg.tpc.tbt.smv.rsnp")
NewFile.WriteLine("txt.reg.inf.bat.vbs.js.ini")
NewFile.WriteLine("Rem 想删除新建菜单中的文件类型则按上面的格式添加到第一行中,只要求格式行号正确可在任意位置插入。")
NewFile.WriteLine("Rem 想添加新建菜单中的文件类型则按上面的格式添加到第二行中,只要求格式行号正确可在任意位置插入。")
NewFile.WriteLine("Rem bfc:Windows的公文包文件")
NewFile.Close
End Sub
Last edited by baomaboy on 2008-3-25 at 12:54 AM ]
① Due to the reason of creating a new VBS template, there will be excessive code (useless code) in the code, and because I am lazy, I didn't delete it. Everyone can make do with it.
② Poor foundation, no good coding habits, I write wherever I think of it, so there may be shortcut codes, but I used very tortuous methods, still because of laziness, I didn't rewrite them.
My purpose is to be able to learn methods and skills and be able to use them. As for beautifying the format, simplifying the code, etc., maybe I will do that when I have time and energy. So I hope everyone don't throw eggs at me ^_^.
Dim WshSHell,FSO
On Error Resume Next
Set WshSHell = WScript.CreateObject("WScript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set WinVer = WshSHell.Environment("Process")
Set Args = WScript.Arguments
CloseTime = 5
FileName = WScript.ScriptName
FileFullName = WScript.ScriptFullName
FilePath = FSO.GetParentFolderName(FileFullName)
InsPath = FSO.GetSpecialFolder(1)
InsFullName = FSO.BuildPath(InsPath ,FileName)
LnkPathNT = WshSHell.SpecialFolders(2)
LnkPath9X = WshSHell.SpecialFolders(14)
LnkPathAll = WshSHell.SpecialFolders("SendTo")
OtherFileName="Manage_New.txt"
OtherFilePath=FSO.GetSpecialFolder(1)
TemFileName="Untitled"
TemFilePath=FSO.GetSpecialFolder(2)
Copyright="Linglong Technology"
QQ="QQ:25926183"
Email="Email:fty1995@163.com"
InsTitle="Manage_New"
InsAnswer="Add/Remove New Menu"
RegPath1="HKEY_CLASSES_ROOT\Directory\shell\Manage_New\"
RegValue1="Add/Remove New Menu"
RegForm1="REG_SZ"
RegPath2="HKEY_CLASSES_ROOT\Directory\shell\Manage_New\command\"
RegValue2="wscript.exe "&InsFullName
RegForm2="REG_SZ"
RegPath3="HKEY_CLASSES_ROOT\*\shell\Manage_New\"
RegValue3="Add/Remove New Menu"
RegForm3="REG_SZ"
RegPath4="HKEY_CLASSES_ROOT\*\shell\Manage_New\command\"
RegValue4="wscript.exe "&InsFullName
RegForm4="REG_SZ"
WshSHell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.cpl\Application","control.exe","REG_SZ"
IF FileFullName <> InsFullName then
intAnswer = MsgBox(" Add " & InsAnswer & " to the right-click menu, " & Chr(10) & Chr(10) & " Remove " & InsAnswer & " from the right-click menu. ", vbQuestion + vbYesNoCancel, "Installation - " & InsTitle & " - " & Copyright)
If intAnswer = vbYes Then
WshSHell.RegWrite RegPath1,RegValue1,RegForm1
WshSHell.RegWrite RegPath2,RegValue2,RegForm1
WshSHell.RegWrite RegPath3,RegValue3,RegForm3
WshSHell.RegWrite RegPath4,RegValue4,RegForm4
FSO.GetFile(FileFullName).Copy(InsFullName)
Call Install
WshSHell.popup _
"Add script file: " & chr(10) & InsFullName & chr(10) & chr(10) & _
"Add registry entry: " & chr(10) & chr(34) & RegPath3 & chr(34) & chr(10) & chr(34) & RegPath1 & chr(34) & chr(10) & _
chr(10) & CloseTime & " seconds later this window will close automatically! " & chr(10) & chr(10) & _
chr(10) & "Copyright(C) " & Copyright & " " & QQ & " " & Email _
, CloseTime, "Installation successful - " & InsTitle & " - " & Copyright, 0 + 64
end if
If intAnswer = vbNo Then
WshSHell.RegDelete RegPath4
WshSHell.RegDelete RegPath3
WshSHell.RegDelete RegPath2
WshSHell.RegDelete RegPath1
FSO.DeleteFile InsFullName
WshSHell.popup _
"Delete script file: " & chr(10) & InsFullName & chr(10) & chr(10) & _
"Delete registry entry: " & chr(10) & chr(34) & RegPath3 & chr(34) & chr(10) & chr(34) & RegPath1 & chr(34) & chr(10) & _
chr(10) & CloseTime & " seconds later this window will close automatically! " & chr(10) & chr(10) & _
chr(10) & "Copyright(C) " & Copyright & " " & QQ & " " & Email _
, CloseTime, "Uninstallation successful - " & InsTitle & " - " & Copyright, 0 + 64
end if
If intAnswer = vbCancel Then
end if
ELSE
FileExName=Inputbox("1. Add extension to New: (add '.' before extension)" & chr(10) & chr(10) & "2. Remove extension from New: (no '.' just enter extension)" & chr(10) & chr(10) & _
"3. Enter '25926183' to customize default extension" & chr(10) & chr(10) & "or perform add and remove operations on all default extensions. " _
,"Enter extension - " & Copyright & " - QQ:25926183","bmp")
if FileExName=chr(50)&chr(53)&chr(57)&chr(50)&chr(54)&chr(49)&chr(56)&chr(51) Then
intAnswer = MsgBox(" Will delete and add all custom extensions, " & Chr(10) & Chr(10) & " Will open the extension custom file for manual modification and save. ", vbQuestion + vbYesNoCancel, "Installation - " & InsTitle & " - " & Copyright)
If intAnswer = vbYes Then
Set ReadFile = FSO.OpenTextFile(FSO.BuildPath(OtherFilePath ,OtherFileName), 1)
ReadLineTextFile=ReadFile.ReadLine
ReadFile.Close
DelNameStrc=ReadLineTextFile
n=len(DelNameStrc)
temp=0
for Tem = 1 to n
if mid(DelNameStrc,Tem,1)="." then
temp=temp+1
end if
next
for i= 1 to temp+1
ni=InStrRev(DelNameStrc,".",n)
mrname=mid(DelNameStrc,ni+1,n-ni)
FileExName="."&mrname
PiaoYi=WshSHell.RegRead("HKCR\" & FileExName & "\")
WshSHell.RegDelete "HKCR\" & FileExName & "\"&PiaoYi&"\ShellNew\"
WshSHell.RegDelete "HKCR\" & FileExName & "\ShellNew\"
n=ni-1
next
Set ReadFile = FSO.OpenTextFile(FSO.BuildPath(OtherFilePath ,OtherFileName), 1)
ReadFile.SkipLine
ReadLineTextFile=ReadFile.ReadLine
ReadFile.Close
AddNameStrc=ReadLineTextFile
n=len(AddNameStrc)
temp=0
for Tem = 1 to n
if mid(AddNameStrc,Tem,1)="." then
temp=temp+1
end if
next
for i= 1 to temp+1
ni=InStrRev(AddNameStrc,".",n)
mrname=mid(AddNameStrc,ni+1,n-ni)
FileExName="."&mrname
PiaoYi=WshSHell.RegRead("HKCR\" & FileExName & "\")
WshSHell.RegWrite "HKCR\" & FileExName & "\ShellNew\NullFile","","REG_SZ"
WshSHell.RegWrite "HKCR\" & FileExName & "\"&PiaoYi&"\ShellNew\NullFile","","REG_SZ"
n=ni-1
next
WshShell.popup chr(10) &_
"Successfully added/removed file types in the New menu. " & chr(10) & chr(10) & chr(10) & _
"Individual extension ShellNew key drift may not be successful, then open the registry to manually find and modify. " & chr(10) & chr(10) & _
chr(10) & CloseTime & " seconds later this window will close automatically! " & chr(10) & chr(10) & _
chr(10) & "Copyright(C) " & Copyright & " " & QQ & " " & Email _
, CloseTime, "Add/Remove New Menu File Type - " & InsTitle & " - " & Copyright, 0 + 64
end if
If intAnswer = vbNo Then
WshSHell.Run ("Notepad.exe " & FSO.BuildPath(OtherFilePath ,OtherFileName))
end if
else
If FileExName<>"" Then
if left(FileExName,1)="." then
WshSHell.RegWrite "HKCR\" & FileExName & "\ShellNew\NullFile","","REG_SZ"
PiaoYi=WshSHell.RegRead("HKCR\" & FileExName & "\")
WshSHell.RegWrite "HKCR\" & FileExName & "\"&PiaoYi&"\ShellNew\NullFile","","REG_SZ"
WshShell.popup chr(10) &_
"Successfully added ' " & FileExName & " ' file in the New menu. " & chr(10) & chr(10) & chr(10) & _
"Individual extension ShellNew key drift may not be successful, then open the registry to manually find and modify. " & chr(10) & chr(10) & _
chr(10) & CloseTime & " seconds later this window will close automatically! " & chr(10) & chr(10) & _
chr(10) & "Copyright(C) " & Copyright & " " & QQ & " " & Email _
, CloseTime, "Add New Menu File Type - " & InsTitle & " - " & Copyright, 0 + 64
else
FileExName="."&FileExName
PiaoYi=WshSHell.RegRead("HKCR\" & FileExName & "\")
WshSHell.RegDelete "HKCR\" & FileExName & "\"&PiaoYi&"\ShellNew\"
WshSHell.RegDelete "HKCR\" & FileExName & "\ShellNew\"
WshShell.popup chr(10) &_
"Successfully removed ' " & FileExName & " ' file from the New menu. " & chr(10) & chr(10) & chr(10) & _
"Individual extension ShellNew key drift may not be successful, then open the registry to manually find and modify. " & chr(10) & chr(10) & _
chr(10) & CloseTime & " seconds later this window will close automatically! " & chr(10) & chr(10) & _
chr(10) & "Copyright(C) " & Copyright & " " & QQ & " " & Email _
, CloseTime, "Remove New Menu File Type - " & InsTitle & " - " & Copyright, 0 + 64
end if
else
end if
end if
End if
Set WshSHell = Nothing
Set FSO = Nothing
Set Args = Nothing
WScript.Quit(0)
Sub Install()
Set NewFile = FSO.CreateTextFile(FSO.BuildPath(OtherFilePath ,OtherFileName), True)
NewFile.WriteLine("bmp.wav.ais.fla.bbp.psd.rar.zip.bfc.mp3.doc.xls.mdb.ppt.nit.rgs.x3d.ctm.uga.t3d.loc.kpg.sip.aep.nfs.srg.tpc.tbt.smv.rsnp")
NewFile.WriteLine("txt.reg.inf.bat.vbs.js.ini")
NewFile.WriteLine("Rem To delete the file type in the New menu, add it to the first line in the above format, only require the format line number to be correct and can be inserted at any position. ")
NewFile.WriteLine("Rem To add the file type in the New menu, add it to the second line in the above format, only require the format line number to be correct and can be inserted at any position. ")
NewFile.WriteLine("Rem bfc: Windows briefcase file")
NewFile.Close
End Sub
Last edited by baomaboy on 2008-3-25 at 12:54 AM ]
此帖被 +4 点积分 点击查看详情 评分人:【 kich 】 | 分数: +2 | 时间:2007-4-13 06:59 | 评分人:【 Wingl83 】 | 分数: +2 | 时间:2008-10-19 13:34 |
|
|

好多菩提树,好多明镜台。本来好多物,好多的尘埃。 |
|
2007-4-13 03:26 |
|
|
kich
中级用户
  
积分 397
发帖 168
注册 2006-10-8
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
谢谢了,今天早上把这个帖翻出来的,因为觉得这个还有很大用的!!Thx
Thanks, I dug this post up this morning because I think it's still very useful!! Thx
|
|
2007-4-13 07:00 |
|
|
baomaboy
银牌会员
    
积分 1513
发帖 554
注册 2005-12-30
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
Originally posted by abczxc at 2007-5-2 11:54:
这个什么脚本呀
这不是个Inputbox吗
Originally posted by abczxc at 2007-5-2 11:54:
What script is this
Isn't this an Inputbox?
|

好多菩提树,好多明镜台。本来好多物,好多的尘埃。 |
|
2007-5-2 16:21 |
|
|
slore
铂金会员
      
积分 5212
发帖 2478
注册 2007-2-8
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
将注册右键部分单独用一个VBS不好么?
Is it not good to separate the part of registering the right - click into a separate VBS?
|
|
2007-5-2 16:22 |
|
|
baomaboy
银牌会员
    
积分 1513
发帖 554
注册 2005-12-30
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
Originally posted by slore at 2007-5-2 16:22:
将注册右键部分单独用一个VBS不好么?
好啊 结构更合理而且精简了 不过要改我的模版了 呵呵 我又不象slore兄那么强只点拨人(“创建个快捷方式吧,给它赋予热键。。。。) 不发帖。恩,要改,而且不只是这一个,而是我所有的主题帖,不过就不更新帖子了,只能是我硬盘上自己的改,谢谢slore兄的好建议。
Originally posted by slore at 2007-5-2 16:22:
Isn't it good to use a separate VBS for the part of registering the right-click?
Okay, the structure is more reasonable and streamlined. But I need to modify my template. Hehe, I'm not as good as Brother slore who only gives pointers ("Create a shortcut and assign a hotkey to it...") without posting. Hmm, I need to make changes, and it's not just this one, but all my topic posts. But I won't update the posts; I can only make changes on my own hard drive. Thanks for Brother slore's good suggestion.
|

好多菩提树,好多明镜台。本来好多物,好多的尘埃。 |
|
2007-5-2 16:40 |
|
|
slore
铂金会员
      
积分 5212
发帖 2478
注册 2007-2-8
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
思路是最重要的,所以点下就可以了。。。发代码我懒,但我知道可以一般就不写了。
而且点拨而不发代码,那么写出来的方法就不局限可以有多种方式。。。那样也可以学习了。。
The idea is the most important, so just click. ... I'm lazy to post code, but I know that usually I don't write it.
And if you give a hint but don't post code, then the method written will not be limited to having multiple ways... That can also be learned.
|
|
2007-5-2 17:03 |
|
|
baomaboy
银牌会员
    
积分 1513
发帖 554
注册 2005-12-30
状态 离线
|
|
2007-5-2 17:38 |
|
|