简体   繁体   English

Windows XP:用WSH脚本替换标准的“新建文件夹”操作

[英]Windows XP: Replace the standard “New Folder” action with a WSH script

Problem: I have a custom WSH script that creates a new directory in a similar manner to the standard "New Folder" action in the Windows desktop. 问题:我有一个自定义的WSH脚本,该脚本以类似于Windows桌面中标准“新建文件夹”操作的方式创建新目录。 This script, however, does a couple of extra things; 但是,该脚本还有其他一些功能。 such as allowing me to create a pre-defined set of child directories (optional); 例如允许我创建一组预定义的子目录(可选); as well as allowing me to add notes and reminders if the directory is work-related or for a particular customer. 以及如果目录与工作有关或针对特定客户,我可以添加注释和提醒。

I would like to be able to make it so this script runs every time I invoke the "New Folder" action in windows xp. 我希望能够做到这一点,以便每次我在Windows XP中调用“新建文件夹”操作时都运行此脚本。

Question: What options are available (if any) to allow me to replace the standard creation of new directories in WindowsXP so that my custom WSH script runs instead? 问题:有哪些可用选项(如果有)允许我替换WindowsXP中新目录的标准创建,以便我的自定义WSH脚本运行?

Bonus Question: Regardless of whether and how cumbersome it is to do such a thing in Windows XP, does Windows Vista make it any easier? 奖励问题:无论在Windows XP中执行此操作是否繁琐,以及Windows Vista是否使它变得更容易?

The standard creation of folders in Windows XP is CreateDirectory . Windows XP中文件夹的标准创建是CreateDirectory This is a Kernel32 function. 这是一个Kernel32函数。

Since you're referring to "New Folder", and expect to have UI, I think you are actually refering to Explorer, the default shell for XP. 由于您指的是“新文件夹”,并且期望具有UI,因此我认为您实际上是指XP的默认外壳Explorer。 "Ne Folder"is a predefined entry in the context menu, and that list is extensible. “ Ne Folder”是上下文菜单中的预定义条目,并且该列表是可扩展的。 However, you'll notice a divider line. 但是,您会注意到分隔线。 "Folder'and "shortcut" are built-ins; the other entries are configured. It would be trivial to add a "New Folder Structure" entry below the divider (ShellNew key in HKCR) “文件夹”和“快捷方式”是内置的;其他条目也已配置。在分隔符下方添加一个“新文件夹结构”条目(HKCR中的ShellNew键)很简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM