Run Registry Value
-
I have had some trouble with this one. How can I Display the contents of the Run Registry value in a textbox? Just incase you are wondering, this key is located in the registry at: HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Run
MessageBox.Show. Reading the registry is also widely documented.
Christian Graus - C++ MVP
-
MessageBox.Show. Reading the registry is also widely documented.
Christian Graus - C++ MVP
Thanks on the quick reply, how would I use message box.Show to display it? like this? Messagebox.show ("HKEY_L...") ? sorry I am allmost certain that is wrong as that just displays text. :sigh:
-
I have had some trouble with this one. How can I Display the contents of the Run Registry value in a textbox? Just incase you are wondering, this key is located in the registry at: HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Run
HI, This Code to Reading fro registry
Imports Microsoft.Win32 Registry.LocalMachine.OpenSubKey("SOFTWARE", True).OpenSubKey("Microsoft", True).OpenSubKey("Windows", True).OpenSubKey("CurrentVersion", True).OpenSubKey("run",True).GetValue(OBJECTNAME>
_The _**OBJECTNAME**_ must be replaced by value name in the Key (RUN) e.g. "TkBellExe" Mohamad A. Flefel mflefel@hotmail.com +962 79 5963865 C#.net & VB.net Developer _
-
Thanks on the quick reply, how would I use message box.Show to display it? like this? Messagebox.show ("HKEY_L...") ? sorry I am allmost certain that is wrong as that just displays text. :sigh:
My point was that even if you typed the question in to google as you typed it here, you'd probably find heaps of articles on how to read the registry.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
HI, This Code to Reading fro registry
Imports Microsoft.Win32 Registry.LocalMachine.OpenSubKey("SOFTWARE", True).OpenSubKey("Microsoft", True).OpenSubKey("Windows", True).OpenSubKey("CurrentVersion", True).OpenSubKey("run",True).GetValue(OBJECTNAME>
_The _**OBJECTNAME**_ must be replaced by value name in the Key (RUN) e.g. "TkBellExe" Mohamad A. Flefel mflefel@hotmail.com +962 79 5963865 C#.net & VB.net Developer _
Thanks for the code snippit and for Chris, I know how to read and write to the registry AND I also know what messagebox.Show does EXACTLY but how is that gonna help me, my question was How can I display the contents of the RUN registry key in a TEXTBOX (thats already on the form) not a message box, I know how to display registry VALUES in a textbox but I do not know how to display the entire contents of a registry SUBKEY. :doh:
-
Thanks for the code snippit and for Chris, I know how to read and write to the registry AND I also know what messagebox.Show does EXACTLY but how is that gonna help me, my question was How can I display the contents of the RUN registry key in a TEXTBOX (thats already on the form) not a message box, I know how to display registry VALUES in a textbox but I do not know how to display the entire contents of a registry SUBKEY. :doh:
Since the registry has a tree structure, maybe the textbox is not the best idea... :):-D:)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
Since the registry has a tree structure, maybe the textbox is not the best idea... :):-D:)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
Uh, ye thanks... :)... lol Would you recommend a Treeview then? if so I would need to know how as I have never worked with the Tree view control. thanks
-
Uh, ye thanks... :)... lol Would you recommend a Treeview then? if so I would need to know how as I have never worked with the Tree view control. thanks
SLRGrant wrote:
Would you recommend a Treeview then?
Yes! MSDN is your good friend, there are samples about populating TreeViews. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
I have had some trouble with this one. How can I Display the contents of the Run Registry value in a textbox? Just incase you are wondering, this key is located in the registry at: HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Run
The RegEnumValue function enumerates the values for the specified open registry key。 For more detail about how to use "RegEnumValue", go to MSDN library for help! This is the URL: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/regenumvalue.asp[^] Please forgive me for my poor English, but I'm a Chinese student!:laugh:
Hakuna Matata! What a wonderful phrase!
-
Thanks for the code snippit and for Chris, I know how to read and write to the registry AND I also know what messagebox.Show does EXACTLY but how is that gonna help me, my question was How can I display the contents of the RUN registry key in a TEXTBOX (thats already on the form) not a message box, I know how to display registry VALUES in a textbox but I do not know how to display the entire contents of a registry SUBKEY. :doh:
i think that u want to display the values entire the "RUN" Key if this correct ,try this code Registry.LocalMachine.OpenSubKey("SOFTWARE", True).OpenSubKey("Microsoft", True).OpenSubKey("Windows", True).OpenSubKey("CurrentVersion", True).OpenSubKey("run", True).GetValueNames() the GetValueNames() return the names of all values in key then u can read the value by using the getvalue("ObjectName") method then u can display them in any way u like
Mohamad A. Flefel mflefel@hotmail.com +962 79 5963865 C#.net & VB.net Developer
-
The RegEnumValue function enumerates the values for the specified open registry key。 For more detail about how to use "RegEnumValue", go to MSDN library for help! This is the URL: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/regenumvalue.asp[^] Please forgive me for my poor English, but I'm a Chinese student!:laugh:
Hakuna Matata! What a wonderful phrase!
yay, thank you for the help guys, I should be fine from here :-D
--------------------------- If I had a £0.01 for the amount of times I have said to people "USE GOOGLE" I would be richer than Bill Gates.