50,236 Members
2 added today
248,628 Resources
73 added today

All Devdex   All XMLdex   Current Category
XMLdex > Forums & Newsgroups > Newsgroups > microsoft.public.dotnet.xml Add this category to My Favorites

View Message Thread  (19 replies)

Results 1 - 10 of 20 Next Page »

Help with right click context menu Add this thread to My Favorites
From: Norm
Date Posted: 5/7/2010 6:58:00 PM

I have the following code to set a right click context menu in explorer that
my program will respond to. Everything works fine, except if I right click
on an .exe file and then left click on the context menu for my program. I
get a message from Windows asking if I want to run the program and I have
the option to click on OK or Cancel. So for some reason Windows is
intercepting my right click message before it gets to my program, but only
on .exe files.

Here is the code to set the context menu:

fWriteValue "HKCR", "*\shell\Erase With FileClean", "icon", "S", App.Path &
"\FileClean.exe"
fWriteValue "HKCR", "*\shell\Erase With FileClean\command", "", "S",
App.Path & "\FileClean.exe %1"

For some reason when right clicking on an .exe the value never gets written
to the registry. Is there some part of the value %1 that I am missing?

Thanks,
Norm

Help with right click context menu
From: Norm
Date Posted: 5/7/2010 6:59:00 PM

I have the following code to set a right click context menu in explorer that
my program will respond to. Everything works fine, except if I right click
on an .exe file and then left click on the context menu for my program. I
get a message from Windows asking if I want to run the program and I have
the option to click on OK or Cancel. So for some reason Windows is
intercepting my right click message before it gets to my program, but only
on .exe files.

Here is the code to set the context menu:

fWriteValue "HKCR", "*\shell\Erase With FileClean", "icon", "S", App.Path &
"\FileClean.exe"
fWriteValue "HKCR", "*\shell\Erase With FileClean\command", "", "S",
App.Path & "\FileClean.exe %1"

For some reason when right clicking on an .exe the value never gets written
to the registry. Is there some part of the value %1 that I am missing?

Thanks,
Norm

Re: Help with right click context menu
From: Norm
Date Posted: 5/7/2010 7:22:00 PM

"Norm" <NormF4@spoof.com> wrote in message
news:2A483E8C-9B7F-4CB8-8EF3-E585E997F790@microsoft.com...
> I have the following code to set a right click context menu in explorer
> that my program will respond to. Everything works fine, except if I right
> click on an .exe file and then left click on the context menu for my
> program. I get a message from Windows asking if I want to run the program
> and I have the option to click on OK or Cancel. So for some reason Windows
> is intercepting my right click message before it gets to my program, but
> only on .exe files.
>
> Here is the code to set the context menu:
>
> fWriteValue "HKCR", "*\shell\Erase With FileClean", "icon", "S", App.Path
> & "\FileClean.exe"
> fWriteValue "HKCR", "*\shell\Erase With FileClean\command", "", "S",
> App.Path & "\FileClean.exe %1"
>
> For some reason when right clicking on an .exe the value never gets
> written to the registry. Is there some part of the value %1 that I am
> missing?
>
> Thanks,
> Norm

Well it appears to be working correctly after compiling, just did not want
to work from IDE.
I will post back if I run into other problems.

Thanks,
Norm

Re: Help with right click context menu
From: Norm
Date Posted: 5/7/2010 7:23:00 PM

"Norm" <NormF4@spoof.com> wrote in message
news:2A483E8C-9B7F-4CB8-8EF3-E585E997F790@microsoft.com...
> I have the following code to set a right click context menu in explorer
> that my program will respond to. Everything works fine, except if I right
> click on an .exe file and then left click on the context menu for my
> program. I get a message from Windows asking if I want to run the program
> and I have the option to click on OK or Cancel. So for some reason Windows
> is intercepting my right click message before it gets to my program, but
> only on .exe files.
>
> Here is the code to set the context menu:
>
> fWriteValue "HKCR", "*\shell\Erase With FileClean", "icon", "S", App.Path
> & "\FileClean.exe"
> fWriteValue "HKCR", "*\shell\Erase With FileClean\command", "", "S",
> App.Path & "\FileClean.exe %1"
>
> For some reason when right clicking on an .exe the value never gets
> written to the registry. Is there some part of the value %1 that I am
> missing?
>
> Thanks,
> Norm

Well it appears to be working correctly after compiling, just did not want
to work from IDE.
I will post back if I run into other problems.

Thanks,
Norm

Re: Help with right click context menu
From: Mayayana
Date Posted: 5/7/2010 9:20:00 PM

I don't think this is related to what you
described, but you may want to try quotes.
Assuming the path value is not an expanding
string, I find it more dependable to write the
value in the command key like so:

"C:\program files\some Program\main.exe" "%1"

rather than:

C:\program files\some Program\main.exe %1



| > I have the following code to set a right click context menu in explorer
| > that my program will respond to. Everything works fine, except if I
right
| > click on an .exe file and then left click on the context menu for my
| > program. I get a message from Windows asking if I want to run the
program
| > and I have the option to click on OK or Cancel. So for some reason
Windows
| > is intercepting my right click message before it gets to my program, but
| > only on .exe files.
| >
| > Here is the code to set the context menu:
| >
| > fWriteValue "HKCR", "*\shell\Erase With FileClean", "icon", "S",
App.Path
| > & "\FileClean.exe"
| > fWriteValue "HKCR", "*\shell\Erase With FileClean\command", "", "S",
| > App.Path & "\FileClean.exe %1"
| >
| > For some reason when right clicking on an .exe the value never gets
| > written to the registry. Is there some part of the value %1 that I am
| > missing?
| >
| > Thanks,
| > Norm
|
| Well it appears to be working correctly after compiling, just did not want
| to work from IDE.
| I will post back if I run into other problems.
|
| Thanks,
| Norm
|

Re: Help with right click context menu
From: Mayayana
Date Posted: 5/7/2010 9:22:00 PM

I don't think this is related to what you
described, but you may want to try quotes.
Assuming the path value is not an expanding
string, I find it more dependable to write the
value in the command key like so:

"C:\program files\some Program\main.exe" "%1"

rather than:

C:\program files\some Program\main.exe %1



| > I have the following code to set a right click context menu in explorer
| > that my program will respond to. Everything works fine, except if I
right
| > click on an .exe file and then left click on the context menu for my
| > program. I get a message from Windows asking if I want to run the
program
| > and I have the option to click on OK or Cancel. So for some reason
Windows
| > is intercepting my right click message before it gets to my program, but
| > only on .exe files.
| >
| > Here is the code to set the context menu:
| >
| > fWriteValue "HKCR", "*\shell\Erase With FileClean", "icon", "S",
App.Path
| > & "\FileClean.exe"
| > fWriteValue "HKCR", "*\shell\Erase With FileClean\command", "", "S",
| > App.Path & "\FileClean.exe %1"
| >
| > For some reason when right clicking on an .exe the value never gets
| > written to the registry. Is there some part of the value %1 that I am
| > missing?
| >
| > Thanks,
| > Norm
|
| Well it appears to be working correctly after compiling, just did not want
| to work from IDE.
| I will post back if I run into other problems.
|
| Thanks,
| Norm
|

Re: Help with right click context menu
From: C. Kevin Provance
Date Posted: 5/7/2010 9:27:00 PM

"Norm" <NormF4@spoof.com> wrote in message news:2A483E8C-9B7F-4CB8-8EF3-E585E997F790@microsoft.com...
:I have the following code to set a right click context menu in explorer that
: my program will respond to. Everything works fine, except if I right click
: on an .exe file and then left click on the context menu for my program. I
: get a message from Windows asking if I want to run the program and I have
: the option to click on OK or Cancel. So for some reason Windows is
: intercepting my right click message before it gets to my program, but only
: on .exe files.
:
: Here is the code to set the context menu:

This is something you would want to handle with your setup program. Not only is it easier, but uninstalling those keys is a breeze. If you reply on your app to do it, chances are it won't, and you'll have a dead entry in the explorer shell.

Re: Help with right click context menu
From: C. Kevin Provance
Date Posted: 5/7/2010 9:28:00 PM

"Norm" <NormF4@spoof.com> wrote in message news:2A483E8C-9B7F-4CB8-8EF3-E585E997F790@microsoft.com...
:I have the following code to set a right click context menu in explorer that
: my program will respond to. Everything works fine, except if I right click
: on an .exe file and then left click on the context menu for my program. I
: get a message from Windows asking if I want to run the program and I have
: the option to click on OK or Cancel. So for some reason Windows is
: intercepting my right click message before it gets to my program, but only
: on .exe files.
:
: Here is the code to set the context menu:

This is something you would want to handle with your setup program. Not only is it easier, but uninstalling those keys is a breeze. If you reply on your app to do it, chances are it won't, and you'll have a dead entry in the explorer shell.

Re: Help with right click context menu
From: Norm
Date Posted: 5/7/2010 10:47:00 PM

"C. Kevin Provance" <*@*.*> wrote in message
news:uGrEG5l7KHA.420@TK2MSFTNGP02.phx.gbl...
>
> "Norm" <NormF4@spoof.com> wrote in message
> news:2A483E8C-9B7F-4CB8-8EF3-E585E997F790@microsoft.com...
> :I have the following code to set a right click context menu in explorer
> that
> : my program will respond to. Everything works fine, except if I right
> click
> : on an .exe file and then left click on the context menu for my program.
> I
> : get a message from Windows asking if I want to run the program and I
> have
> : the option to click on OK or Cancel. So for some reason Windows is
> : intercepting my right click message before it gets to my program, but
> only
> : on .exe files.
> :
> : Here is the code to set the context menu:
>
> This is something you would want to handle with your setup program. Not
> only is it easier, but uninstalling those keys is a breeze. If you reply
> on your app to do it, chances are it won't, and you'll have a dead entry
> in the explorer shell.

Thanks for the information Mayayana, I will look at enclosing the app.exe
and %1 in quotes, I almost have to keep the App.Path as the app may be
installed anywhere.

Kevin, I will look at doing that, but the reason I am doing it in the app,
is so that the entries are not there if the app is not running. I can
certainly include the entries in the setup marked to be removed upon
uninstall.

Thanks again,
Norm

Re: Help with right click context menu
From: Norm
Date Posted: 5/7/2010 10:49:00 PM

"C. Kevin Provance" <*@*.*> wrote in message
news:uGrEG5l7KHA.420@TK2MSFTNGP02.phx.gbl...
>
> "Norm" <NormF4@spoof.com> wrote in message
> news:2A483E8C-9B7F-4CB8-8EF3-E585E997F790@microsoft.com...
> :I have the following code to set a right click context menu in explorer
> that
> : my program will respond to. Everything works fine, except if I right
> click
> : on an .exe file and then left click on the context menu for my program.
> I
> : get a message from Windows asking if I want to run the program and I
> have
> : the option to click on OK or Cancel. So for some reason Windows is
> : intercepting my right click message before it gets to my program, but
> only
> : on .exe files.
> :
> : Here is the code to set the context menu:
>
> This is something you would want to handle with your setup program. Not
> only is it easier, but uninstalling those keys is a breeze. If you reply
> on your app to do it, chances are it won't, and you'll have a dead entry
> in the explorer shell.

Thanks for the information Mayayana, I will look at enclosing the app.exe
and %1 in quotes, I almost have to keep the App.Path as the app may be
installed anywhere.

Kevin, I will look at doing that, but the reason I am doing it in the app,
is so that the entries are not there if the app is not running. I can
certainly include the entries in the setup marked to be removed upon
uninstall.

Thanks again,
Norm

Results 1 - 10 of 20 Next Page »

 

Would you like to track this thread?

By adding this News Thread to your Favorites Area you can refer to it later with just a click of the mouse. Also you can optionally be notified instantly whenever there are any replies posted to this Thread. To add this Thread to your Favorites Area just click on the red arrow next to the subject of the thread above Add this thread to My Favorites.



ASP.NET Shopping Cart
Unlimited items/categories
Unlimited options/choices
Ecommerce toolkit for .NET!

ASP ArticlesThis category has been added to your weekly newsletter
ASP Web Sites
ADSI & WSH BooksThis category has been added to your weekly newsletter
FREE ComponentsThis category has been added to your weekly newsletter
ASP EventsThis category has been added to your weekly newsletter
ASP HeadlinesThis category has been added to your weekly newsletter

CSharp ArticlesThis category has been added to your weekly newsletter
C# Web SitesThis category has been added to your weekly newsletter

SQL ArticlesThis category has been added to your weekly newsletter
SQL Events
SQL HeadlinesThis category has been added to your weekly newsletter
SQL Jobs

Jobs in CaliforniaThis category has been added to your weekly newsletter

XML ArticlesThis category has been added to your weekly newsletter
XML BooksThis category has been added to your weekly newsletter
XML Web Sites
XML Tutorials

free asp host

"Alex Homer"This search has been added to your weekly newsletter

Edit My Favorites Edit Profile & Favorites

 

 

 

 

 




Developersdex Home | ASP | C# | SQL | VB | XML | Gurus
Add Your Link | Add Your Code | FAQ | Advertise | Link To Us | Contact Us |
Copyright © 2010 Developersdex™. All rights reserved.