Right-click shell integration

dcbasic
06-20-2005, 02:58 PM
Is there a better way to do right-click shell integration than hacking it into the registry? This is my current solution:

Public Sub Rightclick_shell(ByVal EXT As String, ByVal Command As String, _
ByVal FileName As String)

Dim b As Object

On Error Resume Next
Set b = CreateObject("wscript.shell")
With b
.regwrite "HKCR\" & EXT
.regwrite "HKCR\" & EXT & "\shell\" & Command & "\command\", FileName & " %1"
End With 'b
On Error GoTo 0

End Sub

herilane
06-29-2005, 05:54 AM
There is no better way as far as I know - because the registry is where Shell context menu information is stored. The only choice you have is how you access the registry.

dcbasic
06-29-2005, 01:26 PM
Isn't there a way you can use a DLL, when then the registry calls? The way that I'm doing it also associates the file name I'm putting the shell integration into.

I found a bit of code as at PSCode, but I wasn't able to compile the DLL, so I just lost effort.

Thanks.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum