创建shell右键菜单项来编辑desktop.ini
我正在尝试创建一个右键单击 shell 菜单项来编辑 desktop.ini
。我已经做到了这一点:
[HKEY_CLASSES_ROOT\Folder\shell\editdesktop]
@="editdesktop"
[HKEY_CLASSES_ROOT\Folder\shell\editdesktop\command]
@="notepad "%L/desktop.ini"
使用cmd命令创建一个desktop.ini并将以下格式附加到desktop.ini文件中,然后用notepad.exe打开它(desktop.ini)
/* Format start */
[.ShellClassInfo]
InfoTip=
ConfirmFileOp=0w
/* Format end */
// ps:我只想创建文件夹 InfoTip ,当我将鼠标悬停在该文件夹上时,它会这样 2 我。
I am trying to create a right click shell menu item to edit desktop.ini
. I have managed to get this far:
[HKEY_CLASSES_ROOT\Folder\shell\editdesktop]
@="editdesktop"
[HKEY_CLASSES_ROOT\Folder\shell\editdesktop\command]
@="notepad "%L/desktop.ini"
use the cmd command to create an desktop.ini and append the following format to the desktop.ini file ,Then open it(desktop.ini) with notepad.exe
/* Format start */
[.ShellClassInfo]
InfoTip=
ConfirmFileOp=0w
/* Format end */
// ps: i just want to creat the folder InfoTip , ,when i hover the folder,it will so 2 me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
CMD.exe 和 Windows Scripting Host 都支持 .ini,因此在不覆盖的情况下实现此功能有点冒险,您还需要在文件夹上设置正确的属性,这可能是 SYSTEM 或 READONLY,具体取决于注册表项!
这个示例应该在默认的 Windows 配置中工作,并尽力不覆盖现有文件:
编写 WSH 或 powershell 脚本可能是一个更好的主意...
CMD.exe nor Windows Scripting Host has .ini support so implementing this without overwriting is a bit risky, you also need to set the correct attribute on the folder and this could be SYSTEM or READONLY depending on a registry key!
This example should work in the default windows configuration and tries its best to not overwrite a existing file:
It is probably a better idea to write a WSH or powershell script...