Adding new Shell menu

A

amir Kamal

Iam trying to add a menu called Ping , I need this menu to
be diplayed when i click on one workstation in the network
place.
i was able to add the menu by adding the entry in the
registry under the
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Network\Shell

I used the following commands
ping.exe %1
ping.exe -t %1

but nothing is working
it looks like it is not getting the name of the workstation
what i understand is that the %1 should be replaced by the
name of the item
Is this correct?

anyone can help???

regards
 
N

Ndi

If the menu is visible, it means that the commandline is the trouble.

Try to use the full path to the ping command, preferably using variables.
Also note that if the ping executable exits immediately, you might not see
it. Try to call

%comspec% /k ping %1

This will leave the command window open and enable you to see what's wrong.
 
A

Amir Kamal

I tried all this but still not working

the command
%comspec% /k ping %1

is giving error

i used a batch file (myping.bat) with the following command

ping %1
cmd

and in the command entry i put the following
c:\myping.bat %1

then when i select from the context menu

it is executing the ping.exe without the machine name

which will give the ping help

iam still trying pass the computer name to the ping program

regards
 
N

Ndi

I am not on a LAN now so I cannot test anything. However:

%d seems to be the name

%h, %i, %j, %l , %s also have special meaning. I could find no
documentation, this is hacked. Use at your own risk.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top