Free Jobs
Reference




Dot Net Forums: ASPNET (77) C#.NET (39) VB.NET (8) AJAX (21) Silver Light (1) WCF (10) WPF (1) WWF (1) .NET 3.5 (3) SQL SERVER (38) Other (3)

Topic: How to read registry values using ASP.NET C# Language

To get the Posted Questions details daily in your mail Click Here

Share this Post on Facebook/Twitter/Orkut Bookmark and Share





User: manishav3388 Post Date: 14 Jun 2012 00:00

Introduction:
How to read registry values using ASP.NET C# Language



Main Content:
Start--run-regedit-HKEY_LOCAL_MACHINE-->SOFTWARE

        <add key="BuildVersionPath" value="SOFTWARE\\w6432Node\\somename\\myVersion" />

        <add key="AppName" value="applicationName" />

    

            string versionNumber = "";

            string buildVersionPath = "";

            string appName = "";

            Microsoft.Win32.RegistryKey rk = null;

            try

            {

                buildVersionPath =                

System.Configuration.ConfigurationManager.AppSettings["BuildVersionPath"];

                appName = System.Configuration.ConfigurationManager.AppSettings["AppName"];

                rk = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(buildVersionPath);

                versionNumber = (System.String)rk.GetValue(appName);

                if (versionNumber == null)

                    versionNumber = string.Empty;

           

                return versionNumber;

Conclusion:
This way we can read computer registry value for a particular version of that application installedmachine
on that



About Writer:
hello,I am JAVA Developer from Noida.


Writer's Link: http://

Writer's Email:







Comments:
Post Comment





Similar Articles Top ArticlesLatest Articles Other Articles by this Author







www.freejobsreference.com Copyright © 2009-2011 | All Rights Reserved
All content of this website is protected by copyright laws and should not be reproduced in any form or by any means without written permission
(Best viewed in IE 8.0+ or Firefox 3.0+ at resolution of 1024 * 768 or higher)