You could use my registry module (it's on my homepage) with the following code. You just have to change all the Bla's here with your own extension, also you can change the extension name and the associated file type. Content type is shown when you download something with your browser and default icon is the file path and the icon index separated with comma.
Code:
Declare Function SHChangeNotify Lib "shell32.dll" (ByVal wEventID As Long, ByVal uFlags As Long, ByVal dwItem1 As String, ByVal dwItem2 As String) As Long
Property Let Associate_BLA(newvalue As Boolean)
If newvalue Then
RegVal("root\.bla\") = "blaFile"
RegVal("root\.bla\Content Type") = "BLA file"
RegVal("root\blaFile\") = "BLA "
RegVal("root\blaFile\DefaultIcon") = App.path & "\" & App.EXEName & ".exe,1"
RegVal("root\blaFile\Shell\Open\Command\") = App.path & "\" & App.EXEName & ".exe %1"
Else
DeleteKey "root\.bla"
DeleteKey "root\blaFile"
End If
SHChangeNotify &H8000000, 0, vbNullString, vbNullString
End Property
Property Get Associate_BLA() As Boolean
Associate_BLA = RegVal("root\.bla\") = "blaFile"
End Property
As this is a boolean property you can just switch it on and off when you like or return if it is set or not
Code:
if Associate_BLA=false then Associate_BLA=true