• xp添加右键"打开文件所在位置"


    以下代码保存为czmb.vbs文件并放在C:windwos目录下:

    Set OS = GetObject("winmgmts:\. ootcimv2")
    Set CF = OS.ExecQuery("Select * From Win32_ShortcutFile WHERE Name = '" & Replace(WScript.Arguments(0),"","\") & "'")
    Set WS = WScript.CreateObject("WScript.Shell")
    For Each objFile in CF
    WS.Run ("explorer /e,/select," & objFile.Target)
    Next

    以下代码保存为czmb.inf文件,右键点击-安装:

    [version]
    Signature=$CHICAGO$
    [defaultinstall]
    addreg=My.add.reg
    [My.add.reg]
    HKCR,lnkfileshellFindTarget,,,"打开文件位置"
    HKCR,lnkfileshellFindTargetcommand,,0x00020000,"%WINDir%system32WScript.exe c:windowsczmb.vbs """%1""""
    HKCR,lnkfileshellFindTargetddeexecTopic,,,"System"

    或者把以下代码保存为reg文件导入注册表也可

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOTlnkfileshellFindTarget]
    @="打开文件位置"

    [HKEY_CLASSES_ROOTlnkfileshellFindTargetcommand]
    @=hex(2):25,00,57,00,49,00,4e,00,44,00,69,00,72,00,25,00,5c,00,73,00,79,00,73,
    00,74,00,65,00,6d,00,33,00,32,00,5c,00,57,00,53,00,63,00,72,00,69,00,70,00,
    74,00,2e,00,65,00,78,00,65,00,20,00,63,00,3a,00,5c,00,77,00,69,00,6e,00,64,
    00,6f,00,77,00,73,00,5c,00,63,00,7a,00,6d,00,62,00,2e,00,76,00,62,00,73,00,
    20,00,22,00,25,00,31,00,22,00,00,00

    [HKEY_CLASSES_ROOTlnkfileshellFindTargetddeexec]

    [HKEY_CLASSES_ROOTlnkfileshellFindTargetddeexecTopic]
    @="System"

  • 相关阅读:
    第三周学习进度条
    软件工程个人作业02
    构建之法阅读笔记02
    学习进度条
    构建之法阅读笔记01
    软件工程个人作业01
    构建之法粗读
    第一次作业
    动手动脑接口与继承
    大道至简第七章第八章
  • 原文地址:https://www.cnblogs.com/mahocon/p/5433752.html
Copyright © 2020-2023  润新知