SlideShare una empresa de Scribd logo
1 de 2
/*
By: John Zamoider
Copywrite: 2016
For Demonstration use only.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Win32;
namespace BasicShell_Support
{
class RegistryModClass
public RegistryModClass ()
{
RegistryKey serviceNames = start.OpenSubKey(keyPath);
if (serviceNames == null)
{
Console.WriteLine("Bad registry key");
return;
}
string[] networkCards = serviceNames.GetSubKeyNames();
serviceNames.Close();
//set seperate public keys
pubKeyLoc = networkCards;
pubKeyPath = keyPath;
}//end constructor
public string searchKey(string[] keyLoc)
{
string returnString = "No";
foreach (string keyname in keyLoc)
{
Console.WriteLine(keyname);
//add local key together to make it managaable
string localKey = start + "" + keyPath + keyname;
try
{
Console.WriteLine(start.OpenSubKey(localKey).GetValue("TcpAckFrequency").ToStrin
g());
returnString = "Installed";
}catch (Exception e)
{
Console.WriteLine(e + "Error Reading registry: " +
"TcpAckFrequency".ToUpper());
returnString = "Not Installed";
}//end catch
}//end foreach
return returnString;
}//end searchKey
public void enterKey(string[] keyLoc)
{
foreach (string keyname in keyLoc)
{
//add local key together to make it managaable
string localKey ="" + keyPath + keyname;
RegistryKey key = start.OpenSubKey(localKey);
key.SetValue("TcpAckFrequency", 1, RegistryValueKind.DWord);
key.Close();
}
}//end enterKey
public void removeKey(string[] keyLoc)
{
foreach (string keyname in keyLoc)
{
//add local key together to make it managaable
string localKey = start + "" + keyPath + keyname;
}
}//end removeKey
public void verifyKey(string[] keyLoc)
{
foreach (string keyName in keyLoc)
{
Console.WriteLine(keyName);
}
}//end verifyKey
public string[] pubKeyLoc;
public string pubKeyPath;
public RegistryKey start = Registry.LocalMachine;
private string keyPath =
"SYSTEMCurrentControlSetServicesTcpipParametersInterfaces";
}//end class
}//end namespace

Más contenido relacionado

La actualidad más candente

What happens when I press enter?
What happens when I press enter?What happens when I press enter?
What happens when I press enter?tobiassjosten
 
Application Logging With Logstash
Application Logging With LogstashApplication Logging With Logstash
Application Logging With Logstashbenwaine
 
ZeroMQ Is The Answer
ZeroMQ Is The AnswerZeroMQ Is The Answer
ZeroMQ Is The AnswerIan Barber
 
React PHP: the NodeJS challenger
React PHP: the NodeJS challengerReact PHP: the NodeJS challenger
React PHP: the NodeJS challengervanphp
 
Cis 216 – shell scripting
Cis 216 – shell scriptingCis 216 – shell scripting
Cis 216 – shell scriptingDan Morrill
 
The promise of asynchronous PHP
The promise of asynchronous PHPThe promise of asynchronous PHP
The promise of asynchronous PHPWim Godden
 
Relayd: a load balancer for OpenBSD
Relayd: a load balancer for OpenBSD Relayd: a load balancer for OpenBSD
Relayd: a load balancer for OpenBSD Giovanni Bechis
 
nginxをソースからインストールしてみたよ
nginxをソースからインストールしてみたよnginxをソースからインストールしてみたよ
nginxをソースからインストールしてみたよmamoru tateoka
 
ZeroMQ Is The Answer: DPC 11 Version
ZeroMQ Is The Answer: DPC 11 VersionZeroMQ Is The Answer: DPC 11 Version
ZeroMQ Is The Answer: DPC 11 VersionIan Barber
 
ZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made SimpleZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made SimpleIan Barber
 
How to send files to remote server via ssh in php
How to send files to remote server via ssh in phpHow to send files to remote server via ssh in php
How to send files to remote server via ssh in phpAndolasoft Inc
 
Connecting to the network
Connecting to the networkConnecting to the network
Connecting to the networkMu Chun Wang
 
MySQLi - An Improved Extension of MySQL
MySQLi - An Improved Extension of MySQLMySQLi - An Improved Extension of MySQL
MySQLi - An Improved Extension of MySQLGlobal Codester
 
Highload осень 2012 лекция 1
Highload осень 2012 лекция 1Highload осень 2012 лекция 1
Highload осень 2012 лекция 1Technopark
 

La actualidad más candente (19)

ActionHeroJS Talk
ActionHeroJS TalkActionHeroJS Talk
ActionHeroJS Talk
 
What happens when I press enter?
What happens when I press enter?What happens when I press enter?
What happens when I press enter?
 
Application Logging With Logstash
Application Logging With LogstashApplication Logging With Logstash
Application Logging With Logstash
 
Phd3
Phd3Phd3
Phd3
 
ZeroMQ Is The Answer
ZeroMQ Is The AnswerZeroMQ Is The Answer
ZeroMQ Is The Answer
 
React PHP: the NodeJS challenger
React PHP: the NodeJS challengerReact PHP: the NodeJS challenger
React PHP: the NodeJS challenger
 
Cis 216 – shell scripting
Cis 216 – shell scriptingCis 216 – shell scripting
Cis 216 – shell scripting
 
The promise of asynchronous PHP
The promise of asynchronous PHPThe promise of asynchronous PHP
The promise of asynchronous PHP
 
Relayd: a load balancer for OpenBSD
Relayd: a load balancer for OpenBSD Relayd: a load balancer for OpenBSD
Relayd: a load balancer for OpenBSD
 
nginxをソースからインストールしてみたよ
nginxをソースからインストールしてみたよnginxをソースからインストールしてみたよ
nginxをソースからインストールしてみたよ
 
Socket.io
Socket.ioSocket.io
Socket.io
 
ZeroMQ Is The Answer: DPC 11 Version
ZeroMQ Is The Answer: DPC 11 VersionZeroMQ Is The Answer: DPC 11 Version
ZeroMQ Is The Answer: DPC 11 Version
 
ZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made SimpleZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made Simple
 
How to send files to remote server via ssh in php
How to send files to remote server via ssh in phpHow to send files to remote server via ssh in php
How to send files to remote server via ssh in php
 
Connecting to the network
Connecting to the networkConnecting to the network
Connecting to the network
 
WebSockets with PHP: Mission impossible
WebSockets with PHP: Mission impossibleWebSockets with PHP: Mission impossible
WebSockets with PHP: Mission impossible
 
Code
CodeCode
Code
 
MySQLi - An Improved Extension of MySQL
MySQLi - An Improved Extension of MySQLMySQLi - An Improved Extension of MySQL
MySQLi - An Improved Extension of MySQL
 
Highload осень 2012 лекция 1
Highload осень 2012 лекция 1Highload осень 2012 лекция 1
Highload осень 2012 лекция 1
 

Destacado

Rentabilidade por segmento fundos imobiliários janeiro 2016
Rentabilidade por segmento fundos imobiliários janeiro 2016Rentabilidade por segmento fundos imobiliários janeiro 2016
Rentabilidade por segmento fundos imobiliários janeiro 2016claudiusinhos
 
Rentabilidade acumulada fundos imobiliários janeiro 2016
Rentabilidade acumulada fundos imobiliários janeiro 2016Rentabilidade acumulada fundos imobiliários janeiro 2016
Rentabilidade acumulada fundos imobiliários janeiro 2016claudiusinhos
 
Rentabilidade valor de face e mercado fundos imobiliários janeiro 2016
Rentabilidade valor de face e mercado fundos imobiliários janeiro 2016Rentabilidade valor de face e mercado fundos imobiliários janeiro 2016
Rentabilidade valor de face e mercado fundos imobiliários janeiro 2016claudiusinhos
 
Volume negociados fundos imobiliários janeiro 2016
Volume negociados fundos imobiliários janeiro 2016Volume negociados fundos imobiliários janeiro 2016
Volume negociados fundos imobiliários janeiro 2016claudiusinhos
 
Paraben and Triclosan- Chemical Mixtures Poster
Paraben and Triclosan- Chemical Mixtures PosterParaben and Triclosan- Chemical Mixtures Poster
Paraben and Triclosan- Chemical Mixtures PosterSimrun Bhullar
 
презентация Men la(обновл)
презентация Men la(обновл)презентация Men la(обновл)
презентация Men la(обновл)Юлия Дьякова
 
บทที่ 3 การดำเนินการวิจัย หน้าแรก
บทที่ 3 การดำเนินการวิจัย หน้าแรกบทที่ 3 การดำเนินการวิจัย หน้าแรก
บทที่ 3 การดำเนินการวิจัย หน้าแรกVisiene Lssbh
 
1人暮らし、いくらあればできる?
1人暮らし、いくらあればできる?1人暮らし、いくらあればできる?
1人暮らし、いくらあればできる?Lili Katoh
 
Enterocoilitis Aguda Necrotizante
Enterocoilitis Aguda NecrotizanteEnterocoilitis Aguda Necrotizante
Enterocoilitis Aguda NecrotizanteAndres Aguilar
 
2014 IEEE JAVA NETWORKING PROJECT On the excess bandwidth allocation in isp t...
2014 IEEE JAVA NETWORKING PROJECT On the excess bandwidth allocation in isp t...2014 IEEE JAVA NETWORKING PROJECT On the excess bandwidth allocation in isp t...
2014 IEEE JAVA NETWORKING PROJECT On the excess bandwidth allocation in isp t...IEEEFINALSEMSTUDENTSPROJECTS
 
2014 IEEE JAVA NETWORKING PROJECT Optimal multicast capacity and delay tradeo...
2014 IEEE JAVA NETWORKING PROJECT Optimal multicast capacity and delay tradeo...2014 IEEE JAVA NETWORKING PROJECT Optimal multicast capacity and delay tradeo...
2014 IEEE JAVA NETWORKING PROJECT Optimal multicast capacity and delay tradeo...IEEEFINALSEMSTUDENTSPROJECTS
 
บทที่ 2 เอกสารและงานวิจัยที่เกี่ยวข้อง หน้าแรก
บทที่ 2 เอกสารและงานวิจัยที่เกี่ยวข้อง หน้าแรกบทที่ 2 เอกสารและงานวิจัยที่เกี่ยวข้อง หน้าแรก
บทที่ 2 เอกสารและงานวิจัยที่เกี่ยวข้อง หน้าแรกVisiene Lssbh
 

Destacado (20)

Rentabilidade por segmento fundos imobiliários janeiro 2016
Rentabilidade por segmento fundos imobiliários janeiro 2016Rentabilidade por segmento fundos imobiliários janeiro 2016
Rentabilidade por segmento fundos imobiliários janeiro 2016
 
Ejercicios (2)
Ejercicios (2)Ejercicios (2)
Ejercicios (2)
 
Actividad 6
Actividad 6Actividad 6
Actividad 6
 
Rentabilidade acumulada fundos imobiliários janeiro 2016
Rentabilidade acumulada fundos imobiliários janeiro 2016Rentabilidade acumulada fundos imobiliários janeiro 2016
Rentabilidade acumulada fundos imobiliários janeiro 2016
 
4th. # 1
4th. # 14th. # 1
4th. # 1
 
Aragon pueblos
Aragon pueblosAragon pueblos
Aragon pueblos
 
Rentabilidade valor de face e mercado fundos imobiliários janeiro 2016
Rentabilidade valor de face e mercado fundos imobiliários janeiro 2016Rentabilidade valor de face e mercado fundos imobiliários janeiro 2016
Rentabilidade valor de face e mercado fundos imobiliários janeiro 2016
 
Volume negociados fundos imobiliários janeiro 2016
Volume negociados fundos imobiliários janeiro 2016Volume negociados fundos imobiliários janeiro 2016
Volume negociados fundos imobiliários janeiro 2016
 
Presentacion personal
Presentacion personalPresentacion personal
Presentacion personal
 
Paraben and Triclosan- Chemical Mixtures Poster
Paraben and Triclosan- Chemical Mixtures PosterParaben and Triclosan- Chemical Mixtures Poster
Paraben and Triclosan- Chemical Mixtures Poster
 
презентация Men la(обновл)
презентация Men la(обновл)презентация Men la(обновл)
презентация Men la(обновл)
 
บทที่ 3 การดำเนินการวิจัย หน้าแรก
บทที่ 3 การดำเนินการวิจัย หน้าแรกบทที่ 3 การดำเนินการวิจัย หน้าแรก
บทที่ 3 การดำเนินการวิจัย หน้าแรก
 
Tutorial uso netvibes
Tutorial uso netvibesTutorial uso netvibes
Tutorial uso netvibes
 
1人暮らし、いくらあればできる?
1人暮らし、いくらあればできる?1人暮らし、いくらあればできる?
1人暮らし、いくらあればできる?
 
Enterocoilitis Aguda Necrotizante
Enterocoilitis Aguda NecrotizanteEnterocoilitis Aguda Necrotizante
Enterocoilitis Aguda Necrotizante
 
2014 IEEE JAVA NETWORKING PROJECT On the excess bandwidth allocation in isp t...
2014 IEEE JAVA NETWORKING PROJECT On the excess bandwidth allocation in isp t...2014 IEEE JAVA NETWORKING PROJECT On the excess bandwidth allocation in isp t...
2014 IEEE JAVA NETWORKING PROJECT On the excess bandwidth allocation in isp t...
 
2014 IEEE JAVA NETWORKING PROJECT Optimal multicast capacity and delay tradeo...
2014 IEEE JAVA NETWORKING PROJECT Optimal multicast capacity and delay tradeo...2014 IEEE JAVA NETWORKING PROJECT Optimal multicast capacity and delay tradeo...
2014 IEEE JAVA NETWORKING PROJECT Optimal multicast capacity and delay tradeo...
 
Atividade 3
Atividade 3Atividade 3
Atividade 3
 
analisis con serna
analisis con sernaanalisis con serna
analisis con serna
 
บทที่ 2 เอกสารและงานวิจัยที่เกี่ยวข้อง หน้าแรก
บทที่ 2 เอกสารและงานวิจัยที่เกี่ยวข้อง หน้าแรกบทที่ 2 เอกสารและงานวิจัยที่เกี่ยวข้อง หน้าแรก
บทที่ 2 เอกสารและงานวิจัยที่เกี่ยวข้อง หน้าแรก
 

Similar a RegistryModClass

Java networking programs socket based
Java networking programs socket basedJava networking programs socket based
Java networking programs socket basedMukesh Tekwani
 
Csmr2012 bettenburg presentation
Csmr2012 bettenburg presentationCsmr2012 bettenburg presentation
Csmr2012 bettenburg presentationSAIL_QU
 
The State of JavaScript (2015)
The State of JavaScript (2015)The State of JavaScript (2015)
The State of JavaScript (2015)Domenic Denicola
 
Borland star team to tfs simple migration
Borland star team to tfs simple migrationBorland star team to tfs simple migration
Borland star team to tfs simple migrationShreesha Rao
 
Hack an ASP .NET website? Hard, but possible!
Hack an ASP .NET website? Hard, but possible! Hack an ASP .NET website? Hard, but possible!
Hack an ASP .NET website? Hard, but possible! Vladimir Kochetkov
 
Developing Applications with MySQL and Java for beginners
Developing Applications with MySQL and Java for beginnersDeveloping Applications with MySQL and Java for beginners
Developing Applications with MySQL and Java for beginnersSaeid Zebardast
 
StackExchange.redis
StackExchange.redisStackExchange.redis
StackExchange.redisLarry Nung
 
Implementing new WebAPIs
Implementing new WebAPIsImplementing new WebAPIs
Implementing new WebAPIsJulian Viereck
 
BATTLESTAR GALACTICA : Saison 5 - Les Cylons passent dans le cloud avec Vert....
BATTLESTAR GALACTICA : Saison 5 - Les Cylons passent dans le cloud avec Vert....BATTLESTAR GALACTICA : Saison 5 - Les Cylons passent dans le cloud avec Vert....
BATTLESTAR GALACTICA : Saison 5 - Les Cylons passent dans le cloud avec Vert....La Cuisine du Web
 
名古屋SGGAE/J勉強会 Grails、Gaelykでハンズオン
名古屋SGGAE/J勉強会 Grails、Gaelykでハンズオン名古屋SGGAE/J勉強会 Grails、Gaelykでハンズオン
名古屋SGGAE/J勉強会 Grails、GaelykでハンズオンTsuyoshi Yamamoto
 
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfOrtus Solutions, Corp
 
Geneva JUG - Cassandra for Java Developers
Geneva JUG - Cassandra for Java DevelopersGeneva JUG - Cassandra for Java Developers
Geneva JUG - Cassandra for Java DevelopersMichaël Figuière
 

Similar a RegistryModClass (20)

JavaExamples
JavaExamplesJavaExamples
JavaExamples
 
Java networking programs socket based
Java networking programs socket basedJava networking programs socket based
Java networking programs socket based
 
Csmr2012 bettenburg presentation
Csmr2012 bettenburg presentationCsmr2012 bettenburg presentation
Csmr2012 bettenburg presentation
 
The State of JavaScript (2015)
The State of JavaScript (2015)The State of JavaScript (2015)
The State of JavaScript (2015)
 
Borland star team to tfs simple migration
Borland star team to tfs simple migrationBorland star team to tfs simple migration
Borland star team to tfs simple migration
 
My java file
My java fileMy java file
My java file
 
srgoc
srgocsrgoc
srgoc
 
Hack an ASP .NET website? Hard, but possible!
Hack an ASP .NET website? Hard, but possible! Hack an ASP .NET website? Hard, but possible!
Hack an ASP .NET website? Hard, but possible!
 
Developing Applications with MySQL and Java for beginners
Developing Applications with MySQL and Java for beginnersDeveloping Applications with MySQL and Java for beginners
Developing Applications with MySQL and Java for beginners
 
StackExchange.redis
StackExchange.redisStackExchange.redis
StackExchange.redis
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Implementing New Web
Implementing New WebImplementing New Web
Implementing New Web
 
Implementing new WebAPIs
Implementing new WebAPIsImplementing new WebAPIs
Implementing new WebAPIs
 
Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI
 
BATTLESTAR GALACTICA : Saison 5 - Les Cylons passent dans le cloud avec Vert....
BATTLESTAR GALACTICA : Saison 5 - Les Cylons passent dans le cloud avec Vert....BATTLESTAR GALACTICA : Saison 5 - Les Cylons passent dans le cloud avec Vert....
BATTLESTAR GALACTICA : Saison 5 - Les Cylons passent dans le cloud avec Vert....
 
名古屋SGGAE/J勉強会 Grails、Gaelykでハンズオン
名古屋SGGAE/J勉強会 Grails、Gaelykでハンズオン名古屋SGGAE/J勉強会 Grails、Gaelykでハンズオン
名古屋SGGAE/J勉強会 Grails、Gaelykでハンズオン
 
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
 
Test automation
Test  automationTest  automation
Test automation
 
Manual tecnic sergi_subirats
Manual tecnic sergi_subiratsManual tecnic sergi_subirats
Manual tecnic sergi_subirats
 
Geneva JUG - Cassandra for Java Developers
Geneva JUG - Cassandra for Java DevelopersGeneva JUG - Cassandra for Java Developers
Geneva JUG - Cassandra for Java Developers
 

RegistryModClass

  • 1. /* By: John Zamoider Copywrite: 2016 For Demonstration use only. */ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Win32; namespace BasicShell_Support { class RegistryModClass public RegistryModClass () { RegistryKey serviceNames = start.OpenSubKey(keyPath); if (serviceNames == null) { Console.WriteLine("Bad registry key"); return; } string[] networkCards = serviceNames.GetSubKeyNames(); serviceNames.Close(); //set seperate public keys pubKeyLoc = networkCards; pubKeyPath = keyPath; }//end constructor public string searchKey(string[] keyLoc) { string returnString = "No"; foreach (string keyname in keyLoc) { Console.WriteLine(keyname); //add local key together to make it managaable string localKey = start + "" + keyPath + keyname; try { Console.WriteLine(start.OpenSubKey(localKey).GetValue("TcpAckFrequency").ToStrin g()); returnString = "Installed"; }catch (Exception e) { Console.WriteLine(e + "Error Reading registry: " + "TcpAckFrequency".ToUpper()); returnString = "Not Installed"; }//end catch
  • 2. }//end foreach return returnString; }//end searchKey public void enterKey(string[] keyLoc) { foreach (string keyname in keyLoc) { //add local key together to make it managaable string localKey ="" + keyPath + keyname; RegistryKey key = start.OpenSubKey(localKey); key.SetValue("TcpAckFrequency", 1, RegistryValueKind.DWord); key.Close(); } }//end enterKey public void removeKey(string[] keyLoc) { foreach (string keyname in keyLoc) { //add local key together to make it managaable string localKey = start + "" + keyPath + keyname; } }//end removeKey public void verifyKey(string[] keyLoc) { foreach (string keyName in keyLoc) { Console.WriteLine(keyName); } }//end verifyKey public string[] pubKeyLoc; public string pubKeyPath; public RegistryKey start = Registry.LocalMachine; private string keyPath = "SYSTEMCurrentControlSetServicesTcpipParametersInterfaces"; }//end class }//end namespace