Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

registry keys and values


// Below is a sample code that illustrates how to query for a given
// Value 'VisualStudio' in the HKLMSOFTWAREMicrosoft tree.


using System;
using System.Runtime.InteropServices;
using LogQuery = Interop.MSUtil.LogQueryClass;
using RegistryInputFormat = Interop.MSUtil.COMRegistryInputContextClass;
using RegRecordSet = Interop.MSUtil.ILogRecordset;

class Program
{
	public static void Main()
	{
		RegRecordSet rs = null;
		try
		{
			LogQuery qry = new LogQuery();
			RegistryInputFormat registryFormat = new RegistryInputFormat();
			string query = @"SELECT Path from HKLMSOFTWAREMicrosoft where
			Value='VisualStudio'";
			rs = qry.Execute(query, registryFormat);
			for(; !rs.atEnd(); rs.moveNext())
				Console.WriteLine(rs.getRecord().toNativeString(","));
		}
		finally
		{
			rs.close();
		}
	}
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: for jump script unity 2d 
Csharp :: how to use double in c# 
Csharp :: C# random.Next error 
Csharp :: unity rb.addexplosionforce 2d 
Csharp :: unity dotween sequence 
Csharp :: .net 4.5 use tls 1.2 
Csharp :: count the number of notes in a given amount c# 
Csharp :: c# get last array element 
Csharp :: c# ? 
Csharp :: select distinct linq mvc 
Csharp :: .net core change localhost port 
Csharp :: deactivate a gameobject unity 
Csharp :: how to set a tag in asp net razor view stackoverflow 
Csharp :: listview inter thread operation not valid 
Csharp :: c# Intersectcase insensitive 
Csharp :: cross thread exception in c# control 
Csharp :: How to make enemy shooting 
Csharp :: how to serialize a property in unity 
Csharp :: link form to a button in dashbord visual c# 
Csharp :: Comparing Arrays using LINQ in C# 
Csharp :: wpf binding object get value 
Csharp :: dictionary all key where value c# 
Csharp :: c# xunit theory classdata model 
Csharp :: KeyValuePair is default 
Csharp :: unity vector3 initialization 
Csharp :: asp.net listbox disable selection 
Csharp :: generate random light colors programatically in android 
Csharp :: scaffold db 
Csharp :: how to check to see if the keyboard buttons are pressed in unity 
Csharp :: create stripe subscription pay_immediately 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =