From 901cbd3a64419a9e72521afc082a7a2b010e2e73 Mon Sep 17 00:00:00 2001 From: yankejustin Date: Tue, 2 Jun 2015 13:18:02 -0400 Subject: [PATCH] Add to the dictionary correctly --- Client/Core/Commands/SystemHandler.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Client/Core/Commands/SystemHandler.cs b/Client/Core/Commands/SystemHandler.cs index 9a2d21e0..c4f174f9 100644 --- a/Client/Core/Commands/SystemHandler.cs +++ b/Client/Core/Commands/SystemHandler.cs @@ -69,6 +69,7 @@ namespace xClient.Core.Commands } } } + i++; using (var key = Registry.LocalMachine.OpenReadonlySubKeySafe("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce")) { if (key != null) @@ -79,6 +80,7 @@ namespace xClient.Core.Commands } } } + i++; using (var key = Registry.CurrentUser.OpenReadonlySubKeySafe("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run")) { if (key != null) @@ -89,6 +91,7 @@ namespace xClient.Core.Commands } } } + i++; using (var key = Registry.CurrentUser.OpenReadonlySubKeySafe("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce")) { if (key != null) @@ -99,6 +102,7 @@ namespace xClient.Core.Commands } } } + i++; if (OSInfo.Bits == 64) { using (var key = Registry.LocalMachine.OpenReadonlySubKeySafe("SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Run")) @@ -111,6 +115,7 @@ namespace xClient.Core.Commands } } } + i++; using (var key = Registry.LocalMachine.OpenReadonlySubKeySafe("SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\RunOnce")) { if (key != null) @@ -121,6 +126,7 @@ namespace xClient.Core.Commands } } } + i++; } if (Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.Startup))) { @@ -129,7 +135,7 @@ namespace xClient.Core.Commands foreach (var file in files) { if (file.Name != "desktop.ini") - startupItems.Add(string.Format("{0}||{1}", file.Name, file.FullName), 6); + startupItems.Add(string.Format("{0}||{1}", file.Name, file.FullName), i); } }