2024年4月3日发(作者:)
'作者:刘先勇 (Eric Liu)
'将以下代码复制并保存为"系统命令.VBS",并运行安装。
'安装成功后,可通过在程序、文件或文件夹上点右键->发送到->系统命令来设置一个
命令,然后在运行中就可以输入该命令打开文件了。
'脚本运行一次后在右键菜单中增加从这里运行CMD的快捷方式,还增加查找目标文
件快捷方式
'On Error Resume Next
If (lcase(right(me,11))<>"") then
set objShell=createObject("")
("Wscript //nologo "&chr(34)&fullname&chr(34))
end if
Set pCmd=CreateObject("")
Set pFso=CreateObject("stemObject")
Set pShell = CreateObject("ation")
Set pSysEnv = CreateObject("").Environment("system")
strComputer = "."
Set pWMIService = GetObject("winmgmts:" & strComputer & "rootcimv2")
Function LGetPath(pFile)
iLastSepPos = InstrRev(pFile, "", -1, 1)
If iLastSepPos <= 0 Then
LGetPath=""
Exit Function
Else
LGetPath = Left(pFile, iLastSepPos-1)
End If
End Function


发布评论