TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sumit Kumawat
NA
454
414.5k
how to get install location of from registry in c#?
Dec 2 2017 9:28 AM
Hi all
i want to fetch install location of all products in my app so for that purpose i am using registry class and using below string value for it
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\UnInstall"
and
"SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\UnInstall" for 64 bit version.
but it is not giving me details of all products for example
notepad ++ available in above path in registry editor but using my code it is not displaying the values for notepad.
below is my code
StreamWriter sw = new StreamWriter(@"D:\localmachineProducts64.txt", true);
using (RegistryKey rk = Registry.LocalMachine.OpenSubKey(uninstallKey))
{
foreach (string skName in rk.GetSubKeyNames())
{
using (RegistryKey sk = rk.OpenSubKey(skName))
{
try
{
sw.Write(sk.GetValue("DisplayName") + "\t" + sk.GetValue("InstallLocation"));
sw.Write(sw.NewLine);
count++;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
sw.Write("Total count :=" + count);
}
sw.Close();
Reply
Answers (
1
)
How to intregrate the Biomatrics Fingureprint with Asp.net ?
Start task service in c# using Task Scheduler .dll