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
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