473,407 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Shell extensions

Hello,

I built property page shellextensions, based on the DependencyWalker sample
from Microsoft.
On some machines these shellextensions do not work. I implemented it like
this (consider the registration code):
[Guid("CB262AEB-CD12-40f6-9712-F0956048B080"), ComVisible(true)]
public class ExtensionHandler : IShellExtInit, IShellPropSheetExt

{
//implementation of Addhandler, etc

//Registration

[System.Runtime.InteropServices.ComRegisterFunction Attribute()]
static void RegisterServer(String str1)
{
RegistryKey root = Registry.LocalMachine;

RegistryKey rk;

// For WINNT set me as an approved shellex
rk =
root.OpenSubKey("Software\\Microsoft\\Windows\\Cur rentVersion\\Shell
Extensions\\Approved", true);

rk.SetValue(guid, "My Shell Extensions");

rk.Close();

root.Close();

root = Registry.ClassesRoot;

string subKey =
"dllfile\\Shellex\\PropertySheetHandlers\\MyShellE xtensions";
rk = root.CreateSubKey(subKey);

rk.SetValue("", guid);

rk.Close();

root.Close();
}

I made an install program like this:

System.Runtime.InteropServices.RegistrationService s regservice = new
System.Runtime.InteropServices.RegistrationService s();

Assembly asm = Assembly.LoadFrom("XshellExtensions.dll");

regservice.RegisterAssembly(asm, AssemblyRegistrationFlags.SetCodeBase );

Which registers the assembly. I am also putting the assembly into the GAC.
My questions are: How do I exactly register the shellextensions correctly?
What is missing, and can I find any documentation about this topic?

Thanks in advance,
Arthur
Jul 21 '05 #1
2 1888
Arthur,
On some machines these shellextensions do not work.


Can you be a bit more specific about what, exactly, doesn't work? Are
you sure the failure is related to registration?

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Jul 21 '05 #2
I think it has something to do with the registration, since AddPages is not
invoked. Strange thing is that on my development machine it actually works
fine (since I started with the sample, I think something is registered that
I forgot later on, but I couldn't find out what). On all other machines,
AddPages is not invoked.

"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:uF**************@TK2MSFTNGP11.phx.gbl...
Arthur,
On some machines these shellextensions do not work.


Can you be a bit more specific about what, exactly, doesn't work? Are
you sure the failure is related to registration?

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: R.Marquez | last post by:
I just happened to bump into this today when I went to the Win32 Python Extensions page. I think the M.H. and his team are a bit too modest. Quote: "win32com.shell grows many more interfaces,...
2
by: Sin | last post by:
Hello everyone, I'm totally stumped at how little info I can find in MSDN or on the web concerning this. It's almost as if only microsoft personel hold the key to these secrets or something!!! ...
4
by: yxq | last post by:
Hello Can anyone tell me Context Menu shell extension? It is better that provide some samples or links. Thanks
5
by: gjuro kladaric | last post by:
it was not possible to make a shell extension from within VB2003, I believe has anything changed since then, can I (easily) write a VB code that would function as a shell extension thank you ...
8
by: Pieter | last post by:
Hi, I want for my application a Windows Shell Integration (for example like TortoiseSVN: http://tortoisesvn.tigris.org/), but i can't find anything about it?? What I basicly wnat is to be...
1
by: James Maeding | last post by:
I was looking for the easiest way to add an item to explorer's right click menus, and I found what looks to be a goldmine. There is a vb.net project available on:...
3
by: Poggs | last post by:
Hi everyone, I used the pattern for Shell Extensions for Context menu from Dino Esposito's article. However I implemented it in more than one application and it seems that those two right click...
3
by: Shafiq | last post by:
Hi, I am trying to insert a new toolbar button to the windows explorer menu. I an able to locate the correct ToolbarWindow32, and inserted a button using the code snippet shown below. However...
5
by: AGP | last post by:
I have been looking far and wide for an easy to implement shell extension. My needs are basic...for two file extensions .YYY and .ZZZ I would like the context menu in explorer to simply show my app...
1
by: Patrick Philippot | last post by:
Hi, According to this discussion: http://forums.msdn.microsoft.com/en-US/netfxbcl/thread/1428326d-7950-42b4-ad94-8e962124043e/ it is very unsafe to write shell extensions in managed code...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.