Advertisement
Guest User

1

a guest
Jan 27th, 2011
576
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   Sub associerExtension()
  2.  
  3.         Dim extension As String = ".test1"
  4.         Dim nomSansPoint As String = extension.Substring(1, extension.Length - 1) 'on aura uniquement test1
  5.        Dim cheminFinalProgramme As String = "<VOTRE CHEMIN ICI>"
  6.  
  7.         My.Computer.Registry.ClassesRoot.CreateSubKey(extension).SetValue("", nomSansPoint, Microsoft.Win32.RegistryValueKind.String)
  8.         My.Computer.Registry.ClassesRoot.CreateSubKey(nomSansPoint & "\shell\open\command").SetValue _
  9.             ("", cheminFinalProgramme  & " ""%l"" ", Microsoft.Win32.RegistryValueKind.String)
  10.  
  11.     End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement