1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

problem changing default icon for associated file type

Discussion in 'Software Development' started by xenogen, Oct 4, 2008.

Thread Status:
Not open for further replies.
  1. xenogen

    xenogen Thread Starter

    Joined:
    Jan 12, 2008
    Messages:
    50
    the code im using seems to be working abolutely perfectly, except for 1 small problem, the actual icon isnt changing, ive checked the registry, and the keys are their but the icon isnt changing.. heres all the code in my program associated with the registry..

    If My.Computer.Registry.ClassesRoot.GetValue(".PRG") = Nothing Then
    My.Computer.Registry.ClassesRoot.CreateSubKey(".PRG").SetValue("", "Pyroguide", Microsoft.Win32.RegistryValueKind.String)
    My.Computer.Registry.ClassesRoot.CreateSubKey("Pyroguide\shell\open\command").SetValue("", Application.ExecutablePath & _
    " ""%l"" ", Microsoft.Win32.RegistryValueKind.String)

    My.Computer.Registry.ClassesRoot.CreateSubKey("Pyroguide\DefaultIcon").SetValue("", My.Computer.FileSystem.SpecialDirectories.MyDocuments & "PyroGuide\Pyroguide.ico", _
    Microsoft.Win32.RegistryValueKind.String)

    any ideas why it isnt working? i have a suspicion i have the icon part completely wrong (following a tutorial that was hard to follow :p)
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - problem changing default
  1. mohittomar13
    Replies:
    7
    Views:
    445
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/756021

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice