标签 注册表 下的文章

右键菜单SignTool快速签名

Windows Registry Editor Version 5.00 
[HKEY_CLASSES_ROOT\exefile\shell\SIGNTOOL]
@="Sign"
[HKEY_CLASSES_ROOT\exefile\shell\SIGNTOOL\command]
@="cmd /c d:\\app\\sign\\signtool.exe sign /f D:\\app\\sign\\tunps.com.pfx /p farstone /v /t http://timestamp.comodoca.com/authenticode \"%1\" & pause"

将以上文件保存为*.reg文件,双击导入注册表,右击需要签名的exe或者dll文件选择Sign即可签名。

右击文件用ImageMagick打水印

http://www.imagemagick.org 下载最新ImageMagick。解压到D:\app\ImageMagick-6.8.6-Q16目录下。保存以下内容为.reg。然后导入此.reg。右击任意jpg/gif/png文件,点击“2tunps.com” 即可给文件的右上角加上文字内容copyright tunps.com

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\2tunps.com]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\2tunps.com\Command]
@="d:\\app\\ImageMagick-6.8.6-Q16\\convert.exe \"%1\" -font Arial -pointsize 28 -draw \"gravity southeast fill black text 0,0 'tunps.com' fill white text 1,1 'tunps.com'\" \"%1\""

-

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\3hahaku]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\3hahaku\Command]
@="d:\\app\\ImageMagick-6.8.8-5\\convert.exe \"%1\" -font Arial -pointsize 30 -draw \"gravity southeast fill black text 0,0 'hahaku.net' fill white text 1,1 'hahaku.net'\" \"%1\""

-

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\1hahaku]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\1hahaku\Command]
@="d:\\app\\ImageMagick-6.8.6-Q16\\convert.exe \"%1\" -font Arial -pointsize 12 -draw \"gravity southeast fill black text 0,0 'hahaku.net' fill white text 1,1 'hahaku.net'\" \"%1\""

文字字体、字号、文字内容、水印位置均可调节。具体参见:

http://www.imagemagick.org/Usage/annotating/#watermarking

将程序加入注册表开机启动[C代码]

/*
code by tunpishuang
vc++ 2008编译通过
使用“使用多字节字符集”,而非Unicode
功能:
在HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run中加入自启动项目hacker,
数据类型REG_EXPAND_SZ,数据值:%systemroot%\hacker.exe
*/
#include <windows.h>
#include <stdio.h>
intmain()
{
LPCSTRregname=”Software\\Microsoft\\Windows\\CurrentVersion\\Run”;
HKEYhkResult;
intret=RegOpenKey(HKEY_LOCAL_MACHINE,regname,&hkResult);
if(ret != ERROR_SUCCESS)
{
printf(“error open registry\n”);
}
ret=RegSetValueEx(hkResult,”hacker”,0,REG_EXPAND_SZ,(unsignedchar*)”%systemroot%\\hacker.exe”,25);

if(ret==0){
printf(“success to write run key\n”);
RegCloseKey(hkResult);
}
else{
printf(“failed to open regedit.%d\n”,ret);
return0;
}
}