PDA

View Full Version : Request for command script


mystica
06-20-2007, 02:04 AM
I'm trying to create a command script that will automatically place some text, in the following location.

Location: MyComputer\Tools\Folder Options\File Types\Folder\Advanced\New

The text I would like to automatically appear is:

In the ACTION box: "Print Folder Contents"
In the APPLICATION USED TO PERFORM ACTION box: "C:\print_directory.bat"

Does anyone know how I can do this?

mangomel
06-20-2007, 12:00 PM
Registry.CreateKey(HKEY_CLASSES_ROOT, "Folder\\shell\\Print_Folder_Content\\command");
Registry.SetValue(HKEY_CLASSES_ROOT, "Folder\\shell\\Print_Folder_Content", "", "Print Folder Content", REG_SZ);
Registry.SetValue(HKEY_CLASSES_ROOT, "Folder\\shell\\Print_Folder_Content\\command", "", 'C:\\print_directory.bat "%1"', REG_SZ);

Is it right?

mystica
06-21-2007, 03:51 AM
Thanks mangomel, I'll give it a try and let you know if it works for me.