查看: 2477|回复: 3
收起左侧

[其他] 应的【 技巧】win7 右键 注册dll,右键 复制文件(夹)名称 路径

[复制链接]
thymefly
发表于 2011-12-9 17:04:56 | 显示全部楼层 |阅读模式
本帖最后由 thymefly 于 2011-12-29 14:59 编辑

不会出现什么找不到dll的错误,
没有dos窗口。
堪称完美级别。我在网上找到别人的,不好用,要么还要安装个什么软件来设置。
于是自己动手吧,虽然只有简单几行代码,不过用了我6个小时的时间。

你的计算机里是没有elevate 和hideexec、nircmd、copyname.bat这4个文件的,
下载所需的文件后放到c:\windows
如果你想放在其他目录,请修改对应的注册表路径。
elevate 和hideexec的下载 http://code.kliu.org/misc/
nircmd的下载网上一搜就是了。

xp下的右键注册dll 的导入注册表的方法 在win7下除非你禁用uac,要不是没法用的。
下面我写的这个在win7 杠杠的。
注册dll.reg
  1. Windows Registry Editor Version 5.00

  2. [HKEY_CLASSES_ROOT\dllfile\shell]

  3. [HKEY_CLASSES_ROOT\dllfile\shell\runas]
  4. @="注册DLL文件"

  5. [HKEY_CLASSES_ROOT\dllfile\shell\runas\command]
  6. @="regsvr32 "%1""

  7. [HKEY_CLASSES_ROOT\dllfile\shell\uninstall]
  8. @="卸载DLL文件"

  9. [HKEY_CLASSES_ROOT\dllfile\shell\uninstall\command]
  10. @="hideexec elevate regsvr32 /u "%1""
复制代码
右键 复制文件(夹)路径.reg
  1. Windows Registry Editor Version 5.00

  2. [HKEY_CLASSES_ROOT\*\shell\copypath]
  3. @="复制文件路径"
  4. "icon"="C:\\Windows\\system32\\SHELL32.dll,68"

  5. [HKEY_CLASSES_ROOT\*\shell\copypath\command]
  6. @="hideexec nircmd.exe clipboard set "%l""


  7. [HKEY_CLASSES_ROOT\Directory\shell\copypath]
  8. @="复制文件夹路径"
  9. "icon"="C:\\Windows\\system32\\SHELL32.dll,68"

  10. [HKEY_CLASSES_ROOT\Directory\shell\copypath\command]
  11. @="hideexec nircmd.exe clipboard set "%l""

复制代码
我在网上搜了下,怎么复制个文件名有这么麻烦么?还要安装软件还有设置。看我的这个~~
右键  复制文件(夹)名称.reg----------------------
  1. Windows Registry Editor Version 5.00

  2. [HKEY_CLASSES_ROOT\*\shell\copyname]
  3. "icon"="C:\\Windows\\system32\\SHELL32.dll,68"
  4. @="复制文件名"

  5. [HKEY_CLASSES_ROOT\*\shell\copyname\command]
  6. @="hideexec "C:\\Windows\\copyname.bat" "%1""

  7. [HKEY_CLASSES_ROOT\Directory\shell\copyname]
  8. @="复制文件夹名称"
  9. "icon"="C:\\Windows\\system32\\SHELL32.dll,68"

  10. [HKEY_CLASSES_ROOT\Directory\shell\copyname\command]
  11. @="hideexec "C:\\Windows\\copyname.bat" "%1""
复制代码
---------------------------------------copyname.bat --------------------------------------------------------------

copyname.bat 就一句话如下

nircmd clipboard set "%~nx1"

但是这句不能集成到注册表中,像这种具有%~nx1扩展的命令不知道在注册表会给你执行成什么样子。

注册表不适合执行命令,只需要它传递参数就行了。

------------------------------------------------------------------------------------------------------------

length
发表于 2011-12-9 17:40:33 | 显示全部楼层
光用这一段行吗
01.Windows Registry Editor Version 5.00

02.

03.[HKEY_CLASSES_ROOT\dllfile\shell]

04.

05.[HKEY_CLASSES_ROOT\dllfile\shell\register]

06.@="注册DLL文件"

07.

08.[HKEY_CLASSES_ROOT\dllfile\shell\register\command]

09.@="hideexec elevate regsvr32 %1"

10.

11.[HKEY_CLASSES_ROOT\dllfile\shell\Unregister]

12.@="卸载DLL文件"

13.

14.[HKEY_CLASSES_ROOT\dllfile\shell\Unregister\command]

15.@="hideexec elevate regsvr32 /u %1"
thymefly
 楼主| 发表于 2011-12-9 17:59:53 | 显示全部楼层
上面我写的是三个功能的注册表。随便选用。互不干扰。
length
发表于 2011-12-12 20:32:06 | 显示全部楼层
确实方便,很实用谢谢搂住
您需要登录后才可以回帖 登录 | 快速注册

本版积分规则

手机版|杀毒软件|软件论坛| 卡饭论坛

Copyright © KaFan  KaFan.cn All Rights Reserved.

Powered by Discuz! X3.4( 沪ICP备2020031077号-2 ) GMT+8, 2024-5-16 03:37 , Processed in 0.120041 second(s), 16 queries .

卡饭网所发布的一切软件、样本、工具、文章等仅限用于学习和研究,不得将上述内容用于商业或者其他非法用途,否则产生的一切后果自负,本站信息来自网络,版权争议问题与本站无关,您必须在下载后的24小时之内从您的电脑中彻底删除上述信息,如有问题请通过邮件与我们联系。

快速回复 客服 返回顶部 返回列表