本帖最后由 zhangop9 于 2011-12-19 14:20 编辑
文件名能不能用文本中的前三字符来写入了,如果说剪切板中的内容是- REGEDIT4
-
- [HKEY_CLASSES_ROOT\.bat\ShellNew]
- "command"="mshta vbscript:Execute(\"CreateObject(\"\"Scripting.FileSystemObject\"\").OpenTextFile(\"\"%2\"\",2,true).Write(clipboardData.getData(\"\"text\"\")):close\")"
- [HKEY_CLASSES_ROOT\.reg\ShellNew]
- "command"="mshta vbscript:Execute(\"CreateObject(\"\"Scripting.FileSystemObject\"\").OpenTextFile(\"\"%2\"\",2,true).Write(clipboardData.getData(\"\"text\"\")):close\")"
- [HKEY_CLASSES_ROOT\.vbs\ShellNew]
- "command"="mshta vbscript:Execute(\"CreateObject(\"\"Scripting.FileSystemObject\"\").OpenTextFile(\"\"%2\"\",2,true).Write(clipboardData.getData(\"\"text\"\")):close\")"
复制代码 那么生成的文件名称就是“regedi.reg”;如果是中文就是剪切板中的前三个字如“新建名.bat” |