Changing Windows registry with C#
-
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 KreskowiakHi, 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!
-
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!
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