 |
|
 |
|
Next: Winzip???
|
| Author |
Message |
External

Since: Aug 07, 2007 Posts: 4
|
(Msg. 1) Posted: Tue Aug 07, 2007 5:53 pm
Post subject: cannot get new menu to work Archived from groups: microsoft>public>windowsxp>customize, others (more info?)
|
|
|
I've read numerous things about adding items to the "new" right-click sub
menu in explorer. I have WinXP SP 2. I want to create new php files by right
clicking in the folder. I wrote a VB program that adds two items to the
right-click menu: Open in Browser, and Open with Notepad. If I choose either
of those, the VB program runs, computes the IIS virtual path and opens the
php file through the browser, or uses what's found at txt/shell/open/command
and opens the php file with that. If I can write a VB program to do that,
surely I should be able to make the "new" sub menu work like I want.
At hkey_classes_root I added .php\ShellNew and put the value name "NullFile"
with a blank string value. That did not work. Even after a reboot, my new
item would not appear in the "new" menu. The file class for .php is
"phpfile", so I added .php\phpfile\ShellNew, also with a "NullFile" value
name. Some instructions I found said to do it that way. That didn't work
either.
TweakUI for XP does not have the "new" tab. So I found TweakUI for Win98 and
used that. In TweakUI for 98, in the "new" tab, lo and behold it has "php"
listed. If I toggle "php" on and off while looking in the registry, it
changes the ShellNew key I added to ShellNew- and back again. If it shows up
in TweakUI for 98, why doesn't it work in the explorer "new" sub menu?
--
dgm |
|
| Back to top |
|
 |  |
External

Since: Jun 29, 2005 Posts: 1055
|
(Msg. 2) Posted: Wed Aug 08, 2007 12:48 am
Post subject: Re: cannot get new menu to work [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
David,
Is the .PHP file associated correctly? Although there is a file class present for .PHP, there need to be a shell\open\command branch with the application defined in (default) under the file class.
--
Regards,
Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
Windows® Troubleshooting http://www.winhelponline.com
"David McDivitt" <david-del.DeleteThis@del-subjectivist.org> wrote in message news:3deib319herb52rog1tuhhjdn0ebpqtm72@4ax.com...
I've read numerous things about adding items to the "new" right-click sub
menu in explorer. I have WinXP SP 2. I want to create new php files by right
clicking in the folder. I wrote a VB program that adds two items to the
right-click menu: Open in Browser, and Open with Notepad. If I choose either
of those, the VB program runs, computes the IIS virtual path and opens the
php file through the browser, or uses what's found at txt/shell/open/command
and opens the php file with that. If I can write a VB program to do that,
surely I should be able to make the "new" sub menu work like I want.
At hkey_classes_root I added .php\ShellNew and put the value name "NullFile"
with a blank string value. That did not work. Even after a reboot, my new
item would not appear in the "new" menu. The file class for .php is
"phpfile", so I added .php\phpfile\ShellNew, also with a "NullFile" value
name. Some instructions I found said to do it that way. That didn't work
either.
TweakUI for XP does not have the "new" tab. So I found TweakUI for Win98 and
used that. In TweakUI for 98, in the "new" tab, lo and behold it has "php"
listed. If I toggle "php" on and off while looking in the registry, it
changes the ShellNew key I added to ShellNew- and back again. If it shows up
in TweakUI for 98, why doesn't it work in the explorer "new" sub menu?
--
dgm |
|
| Back to top |
|
 |  |
External

Since: Aug 07, 2007 Posts: 4
|
(Msg. 3) Posted: Wed Aug 08, 2007 2:50 am
Post subject: Re: cannot get new menu to work [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
>From: "Ramesh, MS-MVP" <ramesh DeleteThis @XOX.mvps.org>
>Date: Wed, 8 Aug 2007 11:00:18 +0530
>Lines: 51
>
>>"David McDivitt" <david-del DeleteThis @del-subjectivist.org> wrote in message news:3deib319herb52rog1tuhhjdn0ebpqtm72@4ax.com...
>>I've read numerous things about adding items to the "new" right-click sub
>>menu in explorer. I have WinXP SP 2. I want to create new php files by right
>>clicking in the folder. I wrote a VB program that adds two items to the
>>right-click menu: Open in Browser, and Open with Notepad. If I choose either
>>of those, the VB program runs, computes the IIS virtual path and opens the
>>php file through the browser, or uses what's found at txt/shell/open/command
>>and opens the php file with that. If I can write a VB program to do that,
>>surely I should be able to make the "new" sub menu work like I want.
>>
>>At hkey_classes_root I added .php\ShellNew and put the value name "NullFile"
>>with a blank string value. That did not work. Even after a reboot, my new
>>item would not appear in the "new" menu. The file class for .php is
>>"phpfile", so I added .php\phpfile\ShellNew, also with a "NullFile" value
>>name. Some instructions I found said to do it that way. That didn't work
>>either.
>>
>>TweakUI for XP does not have the "new" tab. So I found TweakUI for Win98 and
>>used that. In TweakUI for 98, in the "new" tab, lo and behold it has "php"
>>listed. If I toggle "php" on and off while looking in the registry, it
>>changes the ShellNew key I added to ShellNew- and back again. If it shows up
>>in TweakUI for 98, why doesn't it work in the explorer "new" sub menu?
>
>David,
>
>Is the .PHP file associated correctly? Although there is a file class present for .PHP, there need to be a shell\open\command branch with the application defined in (default) under the file class.
>
>--
>Regards,
>
>Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
>Windows® Troubleshooting http://www.winhelponline.com
I dumped out the two registry keys and pasted them here. From all I've read,
the "ShellNew" key as shown should make an item in the "new" sub menu.
[HKEY_CLASSES_ROOT\.php]
@="php_auto_file"
[HKEY_CLASSES_ROOT\.php\ShellNew]
@=""
"NullFile"=""
[HKEY_CLASSES_ROOT\php_auto_file]
@="browser"
[HKEY_CLASSES_ROOT\php_auto_file\shell]
@="browser"
[HKEY_CLASSES_ROOT\php_auto_file\shell\browser]
@="Open in Browser"
[HKEY_CLASSES_ROOT\php_auto_file\shell\browser\command]
@="\"C:\\David\\ASP\\VB\\Projects\\RunPHP\\RunPHP\\obj\\Release\\RunPHP.exe\"
\"%1\""
[HKEY_CLASSES_ROOT\php_auto_file\shell\http]
@="Edit HTTP path"
[HKEY_CLASSES_ROOT\php_auto_file\shell\http\command]
@="\"C:\\David\\ASP\\VB\\Projects\\RunPHP\\RunPHP\\obj\\Release\\RunPHP.exe\"
\"%1\" /set"
[HKEY_CLASSES_ROOT\php_auto_file\shell\notepad]
@="Open with notepad"
[HKEY_CLASSES_ROOT\php_auto_file\shell\notepad\command]
@="\"C:\\David\\ASP\\VB\\Projects\\RunPHP\\RunPHP\\obj\\Release\\RunPHP.exe\"
\"%1\" /notepad"
[HKEY_CLASSES_ROOT\php_auto_file\shell\open]
[HKEY_CLASSES_ROOT\php_auto_file\shell\open\command]
@="\"C:\\php\\php-win.exe\" \"%1\""
--
dgm |
|
| Back to top |
|
 |  |
External

Since: Jun 29, 2005 Posts: 1055
|
(Msg. 4) Posted: Wed Aug 08, 2007 9:48 am
Post subject: Re: cannot get new menu to work [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
The same REG file adds a shellnew entry for PHP. But it's shown as "browser".
Make the alteration here.
[HKEY_CLASSES_ROOT\php_auto_file]
@="browser"
set it as
@="PHP File"
--
Regards,
Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
Windows® Troubleshooting http://www.winhelponline.com
"David McDivitt" <david-del.TakeThisOut@del-subjectivist.org> wrote in message news:kjejb35trkt0q0s0b28geso9rfstfvkt43@4ax.com...
>From: "Ramesh, MS-MVP" <ramesh.TakeThisOut@XOX.mvps.org>
>Date: Wed, 8 Aug 2007 11:00:18 +0530
>Lines: 51
>
>>"David McDivitt" <david-del.TakeThisOut@del-subjectivist.org> wrote in message news:3deib319herb52rog1tuhhjdn0ebpqtm72@4ax.com...
>>I've read numerous things about adding items to the "new" right-click sub
>>menu in explorer. I have WinXP SP 2. I want to create new php files by right
>>clicking in the folder. I wrote a VB program that adds two items to the
>>right-click menu: Open in Browser, and Open with Notepad. If I choose either
>>of those, the VB program runs, computes the IIS virtual path and opens the
>>php file through the browser, or uses what's found at txt/shell/open/command
>>and opens the php file with that. If I can write a VB program to do that,
>>surely I should be able to make the "new" sub menu work like I want.
>>
>>At hkey_classes_root I added .php\ShellNew and put the value name "NullFile"
>>with a blank string value. That did not work. Even after a reboot, my new
>>item would not appear in the "new" menu. The file class for .php is
>>"phpfile", so I added .php\phpfile\ShellNew, also with a "NullFile" value
>>name. Some instructions I found said to do it that way. That didn't work
>>either.
>>
>>TweakUI for XP does not have the "new" tab. So I found TweakUI for Win98 and
>>used that. In TweakUI for 98, in the "new" tab, lo and behold it has "php"
>>listed. If I toggle "php" on and off while looking in the registry, it
>>changes the ShellNew key I added to ShellNew- and back again. If it shows up
>>in TweakUI for 98, why doesn't it work in the explorer "new" sub menu?
>
>David,
>
>Is the .PHP file associated correctly? Although there is a file class present for .PHP, there need to be a shell\open\command branch with the application defined in (default) under the file class.
>
>--
>Regards,
>
>Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
>Windows® Troubleshooting http://www.winhelponline.com
I dumped out the two registry keys and pasted them here. From all I've read,
the "ShellNew" key as shown should make an item in the "new" sub menu.
[HKEY_CLASSES_ROOT\.php]
@="php_auto_file"
[HKEY_CLASSES_ROOT\.php\ShellNew]
@=""
"NullFile"=""
[HKEY_CLASSES_ROOT\php_auto_file]
@="browser"
[HKEY_CLASSES_ROOT\php_auto_file\shell]
@="browser"
[HKEY_CLASSES_ROOT\php_auto_file\shell\browser]
@="Open in Browser"
[HKEY_CLASSES_ROOT\php_auto_file\shell\browser\command]
@="\"C:\\David\\ASP\\VB\\Projects\\RunPHP\\RunPHP\\obj\\Release\\RunPHP..exe\"
\"%1\""
[HKEY_CLASSES_ROOT\php_auto_file\shell\http]
@="Edit HTTP path"
[HKEY_CLASSES_ROOT\php_auto_file\shell\http\command]
@="\"C:\\David\\ASP\\VB\\Projects\\RunPHP\\RunPHP\\obj\\Release\\RunPHP..exe\"
\"%1\" /set"
[HKEY_CLASSES_ROOT\php_auto_file\shell\notepad]
@="Open with notepad"
[HKEY_CLASSES_ROOT\php_auto_file\shell\notepad\command]
@="\"C:\\David\\ASP\\VB\\Projects\\RunPHP\\RunPHP\\obj\\Release\\RunPHP..exe\"
\"%1\" /notepad"
[HKEY_CLASSES_ROOT\php_auto_file\shell\open]
[HKEY_CLASSES_ROOT\php_auto_file\shell\open\command]
@="\"C:\\php\\php-win.exe\" \"%1\""
--
dgm |
|
| Back to top |
|
 |  |
External

Since: Aug 07, 2007 Posts: 4
|
(Msg. 5) Posted: Wed Aug 08, 2007 12:09 pm
Post subject: Re: cannot get new menu to work [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
>From: "Ramesh, MS-MVP" <ramesh.DeleteThis@XOX.mvps.org>
>Date: Wed, 8 Aug 2007 19:41:58 +0530
>Lines: 123
>
>The same REG file adds a shellnew entry for PHP. But it's shown as "browser".
>
>Make the alteration here.
>
>[HKEY_CLASSES_ROOT\php_auto_file]
>@="browser"
>
>set it as
>@="PHP File"
I found the problem. There must be an "open" verb in the file class,
otherwise no entry will appear in the "new" sub menu. There is no
documentation on this I can find. The following is what worked. If there is
no "open" verb, some other verb must be copied. Though I wanted "browse" to
be the default, there still needed to be an "open". I also changed from
NullFile to Command to give more control. At least one line is wrapped
below.
[HKEY_CLASSES_ROOT\.php]
@="php_auto_file"
[HKEY_CLASSES_ROOT\.php\ShellNew]
@=""
"Command"="\"C:\\David\\ASP\\VB\\Projects\\RunPHP\\RunPHP\\obj\\Release\\RunPHP.exe\"
\"%1\" /new"
[HKEY_CLASSES_ROOT\php_auto_file]
@="PHP Web Document"
[HKEY_CLASSES_ROOT\php_auto_file\shell]
@="browser"
[HKEY_CLASSES_ROOT\php_auto_file\shell\browser]
@="Open in Browser"
[HKEY_CLASSES_ROOT\php_auto_file\shell\browser\command]
@="\"C:\\David\\ASP\\VB\\Projects\\RunPHP\\RunPHP\\obj\\Release\\RunPHP.exe\"
\"%1\""
[HKEY_CLASSES_ROOT\php_auto_file\shell\http]
@="Edit HTTP path"
[HKEY_CLASSES_ROOT\php_auto_file\shell\http\command]
@="\"C:\\David\\ASP\\VB\\Projects\\RunPHP\\RunPHP\\obj\\Release\\RunPHP.exe\"
\"%1\" /set"
[HKEY_CLASSES_ROOT\php_auto_file\shell\notepad]
@="Open with notepad"
[HKEY_CLASSES_ROOT\php_auto_file\shell\notepad\command]
@="\"C:\\David\\ASP\\VB\\Projects\\RunPHP\\RunPHP\\obj\\Release\\RunPHP.exe\"
\"%1\" /notepad"
[HKEY_CLASSES_ROOT\php_auto_file\shell\open]
[HKEY_CLASSES_ROOT\php_auto_file\shell\open\command]
@="\"C:\\php\\php-win.exe\" \"%1\""
--
dgm |
|
| Back to top |
|
 |  |
External

Since: Jun 29, 2005 Posts: 1055
|
(Msg. 6) Posted: Thu Aug 09, 2007 1:48 am
Post subject: Re: cannot get new menu to work [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
>> There must be an "open" verb in the file class
That's exactly what I said in my initial response.
<Q>
Although there is a file class present for .PHP, there need to be a shell\open\command branch with the application defined in (default) under the file class.
</Q>
And the Registry export you posted indicates that the "open" verb is already there.
--
Regards,
Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
Windows® Troubleshooting http://www.winhelponline.com
"David McDivitt" <david-del.RemoveThis@del-subjectivist.org> wrote in message news:v9fkb3dp2bgk14thflt5ubpjer8aco07ml@4ax.com...
>From: "Ramesh, MS-MVP" <ramesh.RemoveThis@XOX.mvps.org>
>Date: Wed, 8 Aug 2007 19:41:58 +0530
>Lines: 123
>
>The same REG file adds a shellnew entry for PHP. But it's shown as "browser".
>
>Make the alteration here.
>
>[HKEY_CLASSES_ROOT\php_auto_file]
>@="browser"
>
>set it as
>@="PHP File"
I found the problem. There must be an "open" verb in the file class,
otherwise no entry will appear in the "new" sub menu. There is no
documentation on this I can find. The following is what worked. If there is
no "open" verb, some other verb must be copied. Though I wanted "browse" to
be the default, there still needed to be an "open". I also changed from
NullFile to Command to give more control. At least one line is wrapped
below.
[HKEY_CLASSES_ROOT\.php]
@="php_auto_file"
[HKEY_CLASSES_ROOT\.php\ShellNew]
@=""
"Command"="\"C:\\David\\ASP\\VB\\Projects\\RunPHP\\RunPHP\\obj\\Release\\RunPHP.exe\"
\"%1\" /new"
[HKEY_CLASSES_ROOT\php_auto_file]
@="PHP Web Document"
[HKEY_CLASSES_ROOT\php_auto_file\shell]
@="browser"
[HKEY_CLASSES_ROOT\php_auto_file\shell\browser]
@="Open in Browser"
[HKEY_CLASSES_ROOT\php_auto_file\shell\browser\command]
@="\"C:\\David\\ASP\\VB\\Projects\\RunPHP\\RunPHP\\obj\\Release\\RunPHP..exe\"
\"%1\""
[HKEY_CLASSES_ROOT\php_auto_file\shell\http]
@="Edit HTTP path"
[HKEY_CLASSES_ROOT\php_auto_file\shell\http\command]
@="\"C:\\David\\ASP\\VB\\Projects\\RunPHP\\RunPHP\\obj\\Release\\RunPHP..exe\"
\"%1\" /set"
[HKEY_CLASSES_ROOT\php_auto_file\shell\notepad]
@="Open with notepad"
[HKEY_CLASSES_ROOT\php_auto_file\shell\notepad\command]
@="\"C:\\David\\ASP\\VB\\Projects\\RunPHP\\RunPHP\\obj\\Release\\RunPHP..exe\"
\"%1\" /notepad"
[HKEY_CLASSES_ROOT\php_auto_file\shell\open]
[HKEY_CLASSES_ROOT\php_auto_file\shell\open\command]
@="\"C:\\php\\php-win.exe\" \"%1\""
--
dgm |
|
| Back to top |
|
 |  |
External

Since: Aug 07, 2007 Posts: 4
|
(Msg. 7) Posted: Thu Aug 09, 2007 2:44 am
Post subject: Re: cannot get new menu to work [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
>From: "Ramesh, MS-MVP" <ramesh RemoveThis @XOX.mvps.org>
>Date: Thu, 9 Aug 2007 11:26:34 +0530
>Lines: 93
>
>>> There must be an "open" verb in the file class
>
>That's exactly what I said in my initial response.
>
><Q>
>Although there is a file class present for .PHP, there need to be a shell\open\command branch with the application defined in (default) under the file class.
></Q>
>
>And the Registry export you posted indicates that the "open" verb is already there.
Yes, you did say that. Thanks for helping. I was going back and forth
between two different machines that had different file classes. But I'm glad
to know how it works now so I can automate it.
--
dgm |
|
| Back to top |
|
 |  |
External

Since: Jun 29, 2005 Posts: 1055
|
(Msg. 8) Posted: Thu Aug 09, 2007 8:48 am
Post subject: Re: cannot get new menu to work [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
No problem David.
--
Regards,
Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
Windows® Troubleshooting http://www.winhelponline.com
"David McDivitt" <david-del DeleteThis @del-subjectivist.org> wrote in message news:ps2mb3dnps11r3gjhhee6dj2udl7gln8gi@4ax.com...
>From: "Ramesh, MS-MVP" <ramesh DeleteThis @XOX.mvps.org>
>Date: Thu, 9 Aug 2007 11:26:34 +0530
>Lines: 93
>
>>> There must be an "open" verb in the file class
>
>That's exactly what I said in my initial response.
>
><Q>
>Although there is a file class present for .PHP, there need to be a shell\open\command branch with the application defined in (default) under the file class.
></Q>
>
>And the Registry export you posted indicates that the "open" verb is already there.
Yes, you did say that. Thanks for helping. I was going back and forth
between two different machines that had different file classes. But I'm glad
to know how it works now so I can automate it.
--
dgm |
|
| Back to top |
|
 |  |
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
|
|
|
 |
|
|