Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Changing Windows registry with C#

Changing Windows registry with C#

Scheduled Pinned Locked Moved C#
csharpvisual-studiowindows-adminhelpquestion
22 Posts 4 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Dave Kreskowiak

    OK, so you're writing either a Windows Forms app, or WPF, for some accounting function. You have no reason at all to be saving anything to HKEY_LOCAL_MACHINE. Follow the advice of Griff. As for the Guid of the app, you really have no use for it so why are you interested in it?

    Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
    Dave Kreskowiak

    I Offline
    I Offline
    Ismael_1999
    wrote on last edited by
    #21

    Hi, Dave. I changed my approach. Now I get a special folder path and will use it to store a text file containing the installation folder of my app. The command is:

            string caminho = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData).ToString();
    

    I think it will solve my problem. Thanks for your help and interest!

    D 1 Reply Last reply
    0
    • I Ismael_1999

      Hi, Dave. I changed my approach. Now I get a special folder path and will use it to store a text file containing the installation folder of my app. The command is:

              string caminho = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData).ToString();
      

      I think it will solve my problem. Thanks for your help and interest!

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #22

      GetFolderPath always returns a string, so why are you calling .ToString() on a string?

      Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
      Dave Kreskowiak

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups