public void Enable(bool Enable) { RegEdit.SetValue( @"HKEY_CURRENT_USER\Software\Microsoft\Personalization\Settings", "AcceptedPrivacyPolicy", Enable ? 0 : 1 ); RegEdit.SetValue( @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Language", "Enabled", Enable ? 0 : 1 ); RegEdit.SetValue( @"HKEY_CURRENT_USER\Software\Microsoft\InputPersonalization", "RestrictImplicitTextCollection", Enable ? 1 : 0 ); RegEdit.SetValue( @"HKEY_CURRENT_USER\Software\Microsoft\InputPersonalization", "RestrictImplicitInkCollection", Enable ? 1 : 0 ); RegEdit.SetValue( @"HKEY_CURRENT_USER\Software\Microsoft\InputPersonalization\TrainedDataStore", "HarvestContacts", Enable ? 0 : 1 ); RegEdit.SetValue( @"HKEY_CURRENT_USER\Control Panel\International\User Profile", "HttpAcceptLanguageOptOut", 1 // screenshot 1 - put tweak somewhere else !! ); if (!Enable) { return; } Dir.DeleteDir(@"C:\Users\Bob Vandevliet\AppData\Roaming\Microsoft\Spelling"); }
public void Enable(bool Enable) { RegEdit.SetValue( @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "HideFileExt", Enable ? 0 : 1 ); }
public Camera(string name, RegistryKey cameraKey) { this.name = name; RegEdit camera = new RegEdit(cameraKey); this.shortname = camera.String("shortname"); this.enabled = camera.DWord("enabled") == 1; this.MaxRate = NumberUtil.Clamp(Math.Round(10000000.0 / camera.DWord("interval")), 0, 255); this.CapType = (ScreenCapType)camera.DWord("screencap"); this.Hwva = (HWAccelCamera)camera.DWord("ip_hwaccel"); this.LimitDecode = camera.DWord("smartdecode") == 1; this.WidthPx = camera.DWord("fullxres"); this.HeightPx = camera.DWord("fullyres"); this.Pixels = this.WidthPx * this.HeightPx; this.Type = (CameraType)camera.DWord("type"); this.ip_subpath = camera.String("ip_subpath"); this.MainWidthPx = camera.DWord("mainxres"); this.MainHeightPx = camera.DWord("mainyres"); this.MainPixels = this.MainWidthPx * this.MainHeightPx; this.hasSubStream = !string.IsNullOrWhiteSpace(ip_subpath) && this.MainWidthPx != 0 && this.WidthPx != 0 && this.MainHeightPx != 0 && this.HeightPx != 0 && this.MainWidthPx != this.WidthPx && this.MainHeightPx != this.HeightPx; // Read profile-specific configurations for (int i = 1; i <= 7; i++) { recordSettings[i] = new RecordTabSettings(cameraKey, i); triggerSettings[i] = new TriggerTabSettings(cameraKey, i); } }
static void Main(string[] args) { #if defEnglish int RegState = 0; RegEdit regedit = new RegEdit(); foreach (string b in args) { if (b.Contains('-')) { if (b == "-h") { Console.WriteLine("Command line arguments available\n-b Registery DLL Application\n"); } else if (b == "-b") { RegState = regedit.Start(); } } else { Console.WriteLine("Input argument {0} is not supported", b); } } regedit.End(RegState); if (args.Length == 0) { Console.WriteLine("Application closing because no arguments were given. use -h to see options."); } else { Console.WriteLine("\nApplication closing"); } #endif }
public void Enable(bool Enable) { Service.EnableDisable("PcaSvc", Enable, ServiceStartMode.Automatic); string key = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\AppCompat"; RegEdit.SetValue(key, "DisableEngine", Enable ? 0 : 1); }
public void Enable(bool Enable) { string key = @"HKEY_LOCAL_MACHINE\Software\Microsoft\WcmSvc\wifinetworkmanager"; RegEdit.SetValue($@"{key}\config", "AutoConnectAllowedOEM", Enable ? 0 : 1); RegEdit.SetValue($@"{key}\features", "WifiSenseCredShared", Enable ? 0 : 1); RegEdit.SetValue($@"{key}\features", "WifiSenseOpen", Enable ? 0 : 1); }
private void CompanyGenerate_Shown(object sender, EventArgs e) { //********** Check Server machine and full version*************** if (RegEdit.ReadSubkeyMachineValue() != 1 && RegEdit.ReadSubkeyAppsPremiumValue() != true) { lblCreate.Enabled = false; } }
public void Enable(bool Enable) { RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\WindowsInkWorkspace", "AllowWindowsInkWorkspace", Enable ? 1 : 0 ); }
public void Enable(bool Enable) { Service.EnableDisable("luafv", Enable, ServiceStartMode.Automatic); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System", "EnableLUA", Enable ? 1 : 0 ); }
public void Enable(bool Enable) { string key = @"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem"; RegEdit.SetValue(key, "NtfsMftZoneReservation", Enable ? 2 : 1); RegEdit.SetValue(key, "NtfsDisableLastAccessUpdate", 80000003); // ENABLED BY DEFAULT .. RegEdit.SetValue(key, "NtfsDisable8dot3NameCreation", 2); // DEFAULT AND APPEARS TO BE JUST FINE .. }
public void Enable(bool Enable) { Service.EnableDisable("RemoteRegistry", !Enable, ServiceStartMode.Disabled); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Remote Assistance", "fAllowToGetHelp", 0 // screenshot 6 - put tweak somewhere else !! ); }
public void Enable(bool Enable) { Service.EnableDisable("WSearch", Enable, ServiceStartMode.Automatic); RegEdit.SetValue( @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Search\Preferences", "WholeFileSystem", Enable ? 0 : 1 ); }
public void Enable(bool Enable) { Service.EnableDisable("SysMain", Enable, ServiceStartMode.Automatic); string key = @"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters"; RegEdit.SetValue(key, "EnablePrefetcher", Enable ? 3 : 0); RegEdit.SetValue(key, "EnableSuperfetcher", Enable ? 3 : 0); }
public void Enable(bool Enable) { RegEdit.SetValue( @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SoftLandingEnabled", Enable ? 0 : 1 ); RegEdit.SetValue( @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-338389Enabled", Enable ? 0 : 1 ); }
public void Enable(bool Enable) { RegEdit.SetValue( @"HKEY_CURRENT_USER\Control Panel\Keyboard", "InitialKeyboardIndicators", Enable ? 2 : 2147483648 ); RegEdit.SetValue( @"HKEY_USERS\.DEFAULT\Control Panel\Keyboard", "InitialKeyboardIndicators", Enable ? 2 : 2147483648 ); }
public void Enable(bool Enable) { RegEdit.SetValue( @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications", "GlobalUserDisabled", Enable ? 1 : 0 ); RegEdit.SetValue( @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search", "BackgroundAppGlobalToggle", Enable ? 0 : 1 ); }
/// <summary> /// Checks checkboxes if settings are set. /// </summary> private void CheckSettings() { // Check Services fileMonitorService.Checked = RegEdit.Read("FILEMONITOR") == null ? false : true; gprsService.Checked = RegEdit.Read("GPRS") == null ? false : true; taskSchedulerService.Checked = RegEdit.Read("TASKSCHEDULER") == null ? false : true; welfareCheckService.Checked = RegEdit.Read("WELFARECHECK") == null ? false : true; loopService.Checked = RegEdit.Read("SITELOOP") == null ? false : true; pop3Service.Checked = RegEdit.Read("POP3") == null ? false : true; hrcService.Checked = RegEdit.Read("HIGHRISK") == null ? false : true; }
public void Enable(bool Enable) { Service.EnableDisable("SensorService", !Enable, ServiceStartMode.Manual); Service.EnableDisable("SensrSvc", !Enable, ServiceStartMode.Manual); Service.EnableDisable("SensorDataService", !Enable, ServiceStartMode.Manual); string key = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\LocationAndSensors"; RegEdit.SetValue(key, "DisableSensors", Enable ? 1 : 0); }
public void Enable(bool Enable) { RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters", "AutoShareWks", Enable ? 0 : 1 ); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa", "RestrictAnonymous", Enable ? 1 : 0 ); }
/// <summary> /// Adds or updates this user in the registry. /// </summary> public void Commit() { RegistryKey usersKey = RegistryUtil.HKLM.OpenSubKey("SOFTWARE\\Perspective Software\\Blue Iris\\server\\users", true); RegEdit edit = new RegEdit(usersKey.CreateSubKey(name)); edit.DWord("admin", admin ? 1 : 0); edit.String("password", password_encoded); edit.String("selgroups", selgroups); edit.DWord("noalerts", noalerts ? 1 : 0); edit.DWord("lanonly", lanonly ? 1 : 0); edit.DWord("enabled", enabled ? 1 : 0); edit.DWord("usegroups", usegroups ? 1 : 0); }
private void button1_Click(object sender, EventArgs e) { try { RegEdit reg = new RegEdit(); if (reg.IsRunAsAdmin()) //program run as admin { reg.HKEY = HKEY.CurrentUser; //Select HKEY_CURRENT_USER reg.Address = "Software"; //HKEY_CURRENT_USER\Software if (!reg.Key.Exists("MV Soft")) //This path exist this key or not? { reg.Key.Create("MV Soft"); //If not, create this key } reg.Address = "Software\\MV Soft"; //path "HKEY_CURRENT_USER\Software\MV Soft" for create value //Create the Binary value in the string reg.Value.CreateBinary("Binary1", "1,2,3,4,5,6,7"); //Create the Binary value in the byte array reg.Value.CreateBinary("Binary2", new byte[] { 1, 2, 3, 4, 5, 6, 7 }); //Create the DWord value in the Integer reg.Value.CreateDWord("DWord", 14); //Create the ExpandString value in the string reg.Value.CreateExpandString("ExpandString", "Coded By Soheil MV"); //Create the MultiString value in the string array reg.Value.CreateMultiString("MultiString", new string[] { "a", "b", "c", "d", "e", "f" }); //Create the QWord value in the Integer reg.Value.CreateQWord("QWord", 14); //Create the String value in the string reg.Value.CreateString("String", "Coded By Soheil MV"); //Create the Unknown value in the Object reg.Value.CreateUnknown("Unknown", new string[] { "U", "N", "K", "N", "O", "W", "N" }); MessageBox.Show("Successfully.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Please program run as admin", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } } catch { MessageBox.Show("Error"); } }
public RecordTabSettings(RegistryKey cameraKey, int profile) { this.profile = profile; RegistryKey clipsKey = cameraKey.OpenSubKey("Clips"); // Read settings from record tab. RegEdit record = new RegEdit(clipsKey.OpenSubKey(profile.ToString())); this.sync = record.DWord("sync") > 0; // If > 0, most of the other settings in this object should be ignored. this.camsync = record.String("camsync"); this.DirectToDisc = record.DWord("transcode") == 0; this.recordingFormat = (RecordingFormat)record.DWord("movieformat"); this.VCodec = record.String("vcodec"); this.triggerType = (RecordingTriggerType)record.DWord("continuous"); }
public void Enable(bool Enable) { Service.EnableDisable("WerSvc", Enable, ServiceStartMode.Manual); Service.EnableDisable("wercplsupport", Enable, ServiceStartMode.Manual); if (!Enable) { string key = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\AppCompat"; RegEdit.SetValue(key, "DisableUAR", 1); // Steps Recorder //RegEdit.SetValue(key, "DisableInventory", 1); // Inventory Collector RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting", "Disabled", 1 ); } else { RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting", "Disabled", 0 ); } /** * Always disable handwriting error reports. */ RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\HandwritingErrorReports", "PreventHandwritingErrorReports", 1 ); /** * Never send additional (potentially sensitive data) information in an error report (enhance privacy). */ RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting", "DontSendAdditionalData", 1 ); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting\Consent", "DefaultConsent", 3 ); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\WOW6432Node\Microsoft\Windows\Windows Error Reporting\Consent", "DefaultConsent", 3 ); }
public void Load() { RegEdit options = new RegEdit(RegistryUtil.GetHKLMKey(@"SOFTWARE\Perspective Software\Blue Iris\Options")); HardwareAcceleration = (HWAccel)options.DWord("hwaccel"); ServiceMode = options.DWord("service") == 1; if (options.DWord("limitlive") == 0) { LivePreviewFPS = -2; } else { LivePreviewFPS = RegistryUtil.GetHKLMValue <int>(@"SOFTWARE\Perspective Software\Blue Iris\Options", "livefps", -1); // Custom failure value of -1 } }
public void Enable(bool Enable) { RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\System", "DisableLogonBackgroundImage", Enable ? 1 : 0 ); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\SessionData", "AllowLockScreen", Enable ? 0 : 1 ); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Personalization", "NoLockScreen", Enable ? 1 : 0 ); }
public void Enable(bool Enable) { Service.EnableDisable("PhoneSvc", Enable, ServiceStartMode.Manual); Service.EnableDisable("SmsRouter", Enable, ServiceStartMode.Manual); Service.EnableDisable("TapiSrv", Enable, ServiceStartMode.Manual); Service.EnableDisable("icssvc", Enable, ServiceStartMode.Manual); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\MobilityCenter", "NoMobilityCenter", Enable ? 0 : 1 ); }
public void Enable(bool Enable) { Service.EnableDisable("DoSvc", Enable, ServiceStartMode.Automatic); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config", "DODownloadMode", Enable ? 3 : 0 ); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DeliveryOptimization", "DODownloadMode", Enable ? 3 : 0 ); RegEdit.SetValue( @"HKEY_USERS\S-1-5-20\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Settings", "DownloadMode", Enable ? 2 : 0 ); }
public void Enable(bool Enable) { Commands.schtasks("Microsoft\\Windows\\Windows Defender\\Windows Defender Cache Maintenance", Enable); Commands.schtasks("Microsoft\\Windows\\Windows Defender\\Windows Defender Cleanup", Enable); Commands.schtasks("Microsoft\\Windows\\Windows Defender\\Windows Defender Scheduled Scan", Enable); Commands.schtasks("Microsoft\\Windows\\Windows Defender\\Windows Defender Verification", Enable); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender", "DisableAntiSpyware", Enable ? 0 : 1 ); //string key = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Real-Time Protection"; //RegEdit.SetValue(key, "DisableBehaviorMonitoring", Enable ? 0 : 1); //RegEdit.SetValue(key, "DisableOnAccessProtection", Enable ? 0 : 1); //RegEdit.SetValue(key, "DisableScanOnRealtimeEnable", Enable ? 0 : 1); /** * Always disable Microsoft SpyNet participation. */ RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Defender\Spynet", "SpyNetReporting", 0 ); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Defender\Spynet", "SubmitSamplesConsent", 2 ); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Spynet", "SpyNetReporting", 0 ); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Spynet", "SubmitSamplesConsent", 2 ); Service.EnableDisable("WinDefend", Enable, ServiceStartMode.Automatic, true); Service.EnableDisable("WdNisSvc", Enable, ServiceStartMode.Automatic, true); Service.EnableDisable("SecurityHealthService", Enable, ServiceStartMode.Automatic); }
public void Enable(bool Enable) { Service.EnableDisable("DiagTrack", !Enable, ServiceStartMode.Automatic); // ALSO FOR DIAGNOSTIC SVCs !! Service.EnableDisable("dmwappushsvc", !Enable, ServiceStartMode.Manual); // ALSO FOR DIAGNOSTIC SVCs !! Service.EnableDisable("diagnosticshub.standardcollector.service", !Enable, ServiceStartMode.Manual); // ALSO FOR DIAGNOSTIC SVCs !! RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\WMI\Autologger\AutoLogger-Diagtrack-Listener", "Start", Enable ? 0 : 1 ); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\AppCompat", "AITEnable", Enable ? 0 : 1 ); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\SQMClient\Windows", "CEIPEnable", Enable ? 0 : 1 ); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DataCollection", "AllowTelemetry", Enable ? 0 : 1 ); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\AppCompat", "DisableUAR", Enable ? 1 : 0 ); RegEdit.SetValue( @"HKEY_CURRENT_USER\Software\Microsoft\Input\TIPC", "Enabled", Enable ? 0 : 1 ); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\TabletPC", "PreventHandwritingDataSharing", Enable ? 1 : 0 ); RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoInstrumentation", Enable ? 1 : 0 ); RegEdit.SetValue( @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo", "Enabled", Enable ? 0 : 1 ); }
public void Enable(bool Enable) { Service.EnableDisable("lfsvc", !Enable, ServiceStartMode.Manual); string key = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\LocationAndSensors"; RegEdit.SetValue(key, "DisableLocation", Enable ? 1 : 0); RegEdit.SetValue(key, "DisableWindowsLocationProvider", Enable ? 1 : 0); RegEdit.SetValue(key, "DisableLocationScripting", Enable ? 1 : 0); /** * Prohibit Cortana and Windows Search to access location. */ RegEdit.SetValue( @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Windows Search", "AllowSearchToUseLocation", Enable ? 0 : 1 ); }