H
helder227
Guest
I am trying to associate the text files to open with my application but when I click on a text file then it give me this error.
This is the code i use
Public Sub ChecAssocation()
Try
My.Computer.Registry.ClassesRoot.CreateSubKey(".txt").SetValue("", "Mdlabs_Text_editor", Microsoft.Win32.RegistryValueKind.String)
My.Computer.Registry.ClassesRoot.CreateSubKey("Mdlabs_Text_editor\shell\open\comand").SetValue("", "C:\Program Files\mdlabs_text_editor\editor_de_texto.exe" & " ""%1"" ", Microsoft.Win32.RegistryValueKind.String)
My.Computer.Registry.ClassesRoot.CreateSubKey("Mdlabs_Text_editorDefaultIcon").SetValue("", "C:\Program Files\mdlabs_text_editor\" & "\my new icon for apps.ico")
Catch ex As Exception
End Try
End Sub
Continue reading...
This is the code i use
Public Sub ChecAssocation()
Try
My.Computer.Registry.ClassesRoot.CreateSubKey(".txt").SetValue("", "Mdlabs_Text_editor", Microsoft.Win32.RegistryValueKind.String)
My.Computer.Registry.ClassesRoot.CreateSubKey("Mdlabs_Text_editor\shell\open\comand").SetValue("", "C:\Program Files\mdlabs_text_editor\editor_de_texto.exe" & " ""%1"" ", Microsoft.Win32.RegistryValueKind.String)
My.Computer.Registry.ClassesRoot.CreateSubKey("Mdlabs_Text_editorDefaultIcon").SetValue("", "C:\Program Files\mdlabs_text_editor\" & "\my new icon for apps.ico")
Catch ex As Exception
End Try
End Sub
Continue reading...