forked from cabywabybaby/NvidiaAIO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTweaks.cs
695 lines (531 loc) · 31.6 KB
/
Tweaks.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
using System;
using System.IO;
using System.Net;
using System.Linq;
using Microsoft.Win32;
using System.Diagnostics;
using System.Windows.Forms;
using System.Collections.Generic;
using System.Security.AccessControl;
using System.Net.NetworkInformation;
using System.Runtime.InteropServices;
namespace Nvidia_AIO
{
public partial class Tweaks : UserControl
{
public Tweaks()
{
InitializeComponent();
}
private void button4_Click(object sender, EventArgs e)
{
}
private void button3_Click(object sender, EventArgs e)
{
}
private void button5_Click(object sender, EventArgs e)
{
//Nip less than 457.30
WebClient NIP = new WebClient();
NIP.DownloadFile("https://cdn.discordapp.com/attachments/781708820803092521/868907374633689108/CalebBelowNIP.nip", "C:\\Windows\\Temp\\CalebBelowNIP.nip");
WebClient inspector = new WebClient();
inspector.DownloadFile("https://cdn.discordapp.com/attachments/781708820803092521/868909170064240710/nvidiaProfileInspector.exe", "C:\\Windows\\Temp\\nvidiaProfileInspector.exe");
Process NVSTTINGS = new Process();
NVSTTINGS.StartInfo.FileName = "C:\\Windows\\Temp\\nvidiaProfileInspector.exe";
NVSTTINGS.StartInfo.Arguments = "C:\\Windows\\Temp\\CalebBelowNIP.nip";
NVSTTINGS.StartInfo.UseShellExecute = false;
NVSTTINGS.StartInfo.RedirectStandardInput = true;
NVSTTINGS.Start();
NVSTTINGS.WaitForExit();
Process deleteNIP = new Process();
deleteNIP.StartInfo.FileName = "cmd.exe";
deleteNIP.StartInfo.Arguments = @"/c del /f C:\Windows\Temp\CalebBelowNIP.nip";
deleteNIP.StartInfo.UseShellExecute = false;
deleteNIP.StartInfo.RedirectStandardInput = true;
deleteNIP.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
deleteNIP.Start();
deleteNIP.WaitForExit();
Process DELinp = new Process();
DELinp.StartInfo.FileName = "cmd.exe";
DELinp.StartInfo.Arguments = @"/c del /f C:\Windows\Temp\nvidiaProfileInspector.exe";
DELinp.StartInfo.UseShellExecute = false;
DELinp.StartInfo.RedirectStandardInput = true;
DELinp.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
DELinp.Start();
DELinp.WaitForExit();
}
private void button7_Click(object sender, EventArgs e)
{
//Nip above 457.30
WebClient NIP = new WebClient();
NIP.DownloadFile("https://cdn.discordapp.com/attachments/781708820803092521/868907389531869245/catAbove.nip", "C:\\Windows\\Temp\\catAbove.nip");
WebClient inspector = new WebClient();
inspector.DownloadFile("https://cdn.discordapp.com/attachments/781708820803092521/868909170064240710/nvidiaProfileInspector.exe", "C:\\Windows\\Temp\\nvidiaProfileInspector.exe");
Process NVSTTINGS = new Process();
NVSTTINGS.StartInfo.FileName = "C:\\Windows\\Temp\\nvidiaProfileInspector.exe";
NVSTTINGS.StartInfo.Arguments = "C:\\Windows\\Temp\\catAbove.nip";
NVSTTINGS.StartInfo.UseShellExecute = false;
NVSTTINGS.StartInfo.RedirectStandardInput = true;
NVSTTINGS.Start();
NVSTTINGS.WaitForExit();
Process deleteNIP = new Process();
deleteNIP.StartInfo.FileName = "cmd.exe";
deleteNIP.StartInfo.Arguments = @"/c del /f C:\Windows\Temp\catAbove.nip";
deleteNIP.StartInfo.UseShellExecute = false;
deleteNIP.StartInfo.RedirectStandardInput = true;
deleteNIP.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
deleteNIP.Start();
deleteNIP.WaitForExit();
Process DELinp = new Process();
DELinp.StartInfo.FileName = "cmd.exe";
DELinp.StartInfo.Arguments = @"/c del /f C:\Windows\Temp\nvidiaProfileInspector.exe";
DELinp.StartInfo.UseShellExecute = false;
DELinp.StartInfo.RedirectStandardInput = true;
DELinp.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
DELinp.Start();
DELinp.WaitForExit();
}
private void button9_Click(object sender, EventArgs e)
{
//Reset Nvidia Settings
WebClient DefaultSettings = new WebClient();
DefaultSettings.DownloadFile("https://cdn.discordapp.com/attachments/781708820803092521/832630250042294312/DefaultSettings.bat", "C:\\Windows\\Temp\\DefaultSettings.bat");
Process revert = new Process();
revert.StartInfo.FileName = "C:\\Windows\\Temp\\DefaultSettings.bat";
revert.StartInfo.UseShellExecute = false;
revert.StartInfo.RedirectStandardInput = true;
revert.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
revert.Start();
revert.WaitForExit();
MessageBox.Show("Defaulted Nvidia settings");
Process deletebat = new Process();
deletebat.StartInfo.FileName = "cmd.exe";
deletebat.StartInfo.Arguments = @"/c del /f C:\Windows\Temp\DefaultSettings.bat";
deletebat.StartInfo.UseShellExecute = false;
deletebat.StartInfo.RedirectStandardInput = true;
deletebat.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
deletebat.Start();
deletebat.WaitForExit();
}
private void button10_Click(object sender, EventArgs e)
{
//Restart GPU DRIVER
WebClient restart = new WebClient();
restart.DownloadFile("https://cdn.discordapp.com/attachments/781708820803092521/832445757671473182/restart64.exe", "C:\\Windows\\Temp\\restart64.exe");
Process restart64 = new Process();
restart64.StartInfo.FileName = "C:\\Windows\\Temp\\restart64.exe";
restart64.StartInfo.Arguments = "/q";
restart64.StartInfo.UseShellExecute = false;
restart64.StartInfo.RedirectStandardInput = true;
restart64.Start();
restart64.WaitForExit();
Process delete64 = new Process();
delete64.StartInfo.FileName = "cmd.exe";
delete64.StartInfo.Arguments = @"/c del /f C:\Windows\Temp\restart64.exe";
delete64.StartInfo.UseShellExecute = false;
delete64.StartInfo.RedirectStandardInput = true;
delete64.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
delete64.Start();
delete64.WaitForExit();
}
private void button8_Click(object sender, EventArgs e)
{
//Unrestrict CLock Policy
WebClient DefaultSettings = new WebClient();
DefaultSettings.DownloadFile("https://cdn.discordapp.com/attachments/781708820803092521/832642578947113030/UnrestrictClock.bat", "C:\\Windows\\Temp\\UnrestrictClock.bat");
Process unr = new Process();
unr.StartInfo.FileName = "C:\\Windows\\Temp\\UnrestrictClock.bat";
unr.StartInfo.UseShellExecute = false;
unr.StartInfo.RedirectStandardInput = true;
unr.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
unr.Start();
unr.WaitForExit();
MessageBox.Show("Set an Unrestricted Clock Policy");
Process deletebat = new Process();
deletebat.StartInfo.FileName = "cmd.exe";
deletebat.StartInfo.Arguments = @"/c del /f C:\Windows\Temp\UnrestrictClock.bat";
deletebat.StartInfo.UseShellExecute = false;
deletebat.StartInfo.RedirectStandardInput = true;
deletebat.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
deletebat.Start();
deletebat.WaitForExit();
}
private void button6_Click(object sender, EventArgs e)
{
//Restrict Clock Policy
WebClient DefaultSettings = new WebClient();
DefaultSettings.DownloadFile("https://cdn.discordapp.com/attachments/781708820803092521/832642584744558683/ZRestrictCock.bat", "C:\\Windows\\Temp\\ZRestrictCock.bat");
Process unr = new Process();
unr.StartInfo.FileName = "C:\\Windows\\Temp\\ZRestrictCock.bat";
unr.StartInfo.UseShellExecute = false;
unr.StartInfo.RedirectStandardInput = true;
unr.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
unr.Start();
unr.WaitForExit();
MessageBox.Show("Set Restricted Clock Policy");
Process deletebat = new Process();
deletebat.StartInfo.FileName = "cmd.exe";
deletebat.StartInfo.Arguments = @"/c del /f C:\Windows\Temp\ZRestrictCock.bat";
deletebat.StartInfo.UseShellExecute = false;
deletebat.StartInfo.RedirectStandardInput = true;
deletebat.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
deletebat.Start();
deletebat.WaitForExit();
}
private void button15_Click_1(object sender, EventArgs e)
{
// Block Host File telemetry
}
private void button12_Click(object sender, EventArgs e)
{
//launch Control Panel
// C:\Program Files\NVIDIA Corporation\Control Panel Client
Process Cont = new Process();
Cont.StartInfo.FileName = "C:\\Program Files\\Nvidia Corporation\\Control Panel Client\\nvcplui.exe";
Cont.StartInfo.UseShellExecute = false;
Cont.StartInfo.RedirectStandardInput = true;
Cont.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
Cont.Start();
}
private void button11_Click(object sender, EventArgs e)
{
//Other nvidia settings
MessageBox.Show("warning. This will restart your GPU driver 2-3 times");
WebClient LAZY = new WebClient();
LAZY.DownloadFile("https://cdn.discordapp.com/attachments/846483420489056296/869071188863885322/TooLazy.bat", "C:\\Windows\\Temp\\TooLazy.bat");
Process yo = new Process();
yo.StartInfo.FileName = "C:\\Windows\\Temp\\TooLazy.bat";
yo.StartInfo.UseShellExecute = false;
yo.StartInfo.RedirectStandardInput = true;
yo.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
yo.Start();
yo.WaitForExit();
Process deletebat = new Process();
deletebat.StartInfo.FileName = "cmd.exe";
deletebat.StartInfo.Arguments = @"/c del /f C:\Windows\Temp\TooLazy.bat";
deletebat.StartInfo.UseShellExecute = false;
deletebat.StartInfo.RedirectStandardInput = true;
deletebat.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
deletebat.Start();
deletebat.WaitForExit();
RegistryKey NVTweak = Registry.LocalMachine.CreateSubKey(@"System\CurrentControlSet\Services\nvlddmkm\Global\NVTweak", RegistryKeyPermissionCheck.ReadWriteSubTree);
RegistryKey CP = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Nvidia Corporation\Global\NVTweak", RegistryKeyPermissionCheck.ReadWriteSubTree);
CP.SetValue("Gestalt", "1", RegistryValueKind.DWord);
NVTweak.SetValue("RmProfilingAdminOnly", "0", RegistryValueKind.DWord);
NVTweak.SetValue("NvDevToolsVisible", "1", RegistryValueKind.DWord);
NVTweak.SetValue("NvCplPhysxAuto", "0", RegistryValueKind.DWord);
WebClient restart = new WebClient();
restart.DownloadFile("https://cdn.discordapp.com/attachments/781708820803092521/832445757671473182/restart64.exe", "C:\\Windows\\Temp\\restart64.exe");
Process restart64 = new Process();
restart64.StartInfo.FileName = "C:\\Windows\\Temp\\restart64.exe";
restart64.StartInfo.Arguments = "/q";
restart64.StartInfo.UseShellExecute = false;
restart64.StartInfo.RedirectStandardInput = true;
restart64.Start();
restart64.WaitForExit();
CP.SetValue("Gestalt", "513", RegistryValueKind.DWord);
restart64.StartInfo.FileName = "C:\\Windows\\Temp\\restart64.exe";
restart64.StartInfo.Arguments = "/q";
restart64.StartInfo.UseShellExecute = false;
restart64.StartInfo.RedirectStandardInput = true;
restart64.Start();
restart64.WaitForExit();
Process delete64 = new Process();
delete64.StartInfo.FileName = "cmd.exe";
delete64.StartInfo.Arguments = @"/c del /f C:\Windows\Temp\restart64.exe";
delete64.StartInfo.UseShellExecute = false;
delete64.StartInfo.RedirectStandardInput = true;
delete64.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
delete64.Start();
delete64.WaitForExit();
MessageBox.Show("Applied Settings");
// nvidia settings besides main ones that the .nip does
// dwords to add NvDevToolsVisible value 1 NvCplPhysxAuto value 0
// RegistryKey Cclass = Registry.LocalMachine.CreateSubKey(@"System\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000", RegistryKeyPermissionCheck.ReadWriteSubTree);
//// RegistryKey NVTweak = Registry.LocalMachine.CreateSubKey(@"System\CurrentControlSet\Services\nvlddmkm\Global\NVTweak", RegistryKeyPermissionCheck.ReadWriteSubTree);
// RegistryKey CP = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Nvidia Corporation\Global\NVTweak", RegistryKeyPermissionCheck.ReadWriteSubTree);
// RegistryKey Coler = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Nvidia Corporation\Global\NVTweak\Devices\344251435-0\Color", RegistryKeyPermissionCheck.ReadWriteSubTree);
// Cclass.SetValue("_User_Video_Active_Device", "2147483648", RegistryValueKind.DWord);
// Cclass.SetValue("_User_SUB0_DFP2_VAL_Brightness", "0", RegistryValueKind.DWord);
// Cclass.SetValue("_User_SUB0_DFP2_XEN_Brightness", "2147483649", RegistryValueKind.DWord);
// Cclass.SetValue("_User_SUB0_DFP2_VAL_RGB_Gamma_B", "100", RegistryValueKind.DWord);
// Cclass.SetValue("_User_SUB0_DFP2_XEN_RGB_Gamma_B", "2147483649", RegistryValueKind.DWord);
// Cclass.SetValue("_User_SUB0_DFP2_VAL_Saturation", "100", RegistryValueKind.DWord);
// Cclass.SetValue("_User_SUB0_DFP2_XEN_Saturation", "2147483649", RegistryValueKind.DWord);
// Cclass.SetValue("_User_SUB0_DFP2_VAL_Contrast", "100", RegistryValueKind.DWord);
// Cclass.SetValue("_User_SUB0_DFP2_XEN_Contrast", "2147483649", RegistryValueKind.DWord);
//// Cclass.SetValue("_User_SUB0_DFP2_VAL_RGB_Gamma_R", "100", RegistryValueKind.DWord);
// Cclass.SetValue("_User_SUB0_DFP2_XEN_RGB_Gamma_R", "2147483649", RegistryValueKind.DWord);
// Cclass.SetValue("_User_SUB0_DFP2_XALG_Color_Range", new byte[] { 0x0, 0x0, 0x0, 0x8 }, RegistryValueKind.Binary);
//umd.SetValue("TFQ", new byte[] { 32, 0x0 }, RegistryValueKind.Binary);
//CP.SetValue("Gestalt", "1", RegistryValueKind.DWord);
//after restart run CP.SetValue("Gestalt", "513", RegistryValueKind.DWord);
//NVTweak.SetValue("RmProfilingAdminOnly", "0", RegistryValueKind.DWord);
}
private void button1_Click(object sender, EventArgs e)
{
//Preemption
// HKEY_LOCAL_MACHINE\SOFTWARE\NVAIO
//nvlddmkm.SetValue("LogWarningEntries", "0", RegistryValueKind.DWord);
RegistryKey nvlddmkm2 = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\NVAIO", RegistryKeyPermissionCheck.ReadWriteSubTree);
RegistryKey nvlddmkm = Registry.LocalMachine.CreateSubKey(@"System\CurrentControlSet\Services\nvlddmkm", RegistryKeyPermissionCheck.ReadWriteSubTree);
RegistryKey Scheduler = Registry.LocalMachine.CreateSubKey(@"System\CurrentControlSet\Control\GraphicsDrivers\Scheduler", RegistryKeyPermissionCheck.ReadWriteSubTree);
try
{
if (nvlddmkm2.GetValue("Preemption") != null)
{
if (nvlddmkm2.GetValue("Preemption").ToString() == "1")
{
if (MessageBox.Show("Preemption is already Disabled. Do you want to enable?", "Preemption", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
nvlddmkm2.DeleteValue("Preemption");
nvlddmkm.DeleteValue("PerfAnalyzeMidBufferPreemption");
nvlddmkm.DeleteValue("EnableMidBufferPreemption");
nvlddmkm.DeleteValue("EnableAsyncMidBufferPreemption");
nvlddmkm.DeleteValue("DisablePreemption");
nvlddmkm.DeleteValue("DisableCudaContextPreemption");
Scheduler.DeleteValue("EnablePreemption");
MessageBox.Show("Preemption Dwords have been deleted.", "Preemption", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
else
{
nvlddmkm2.SetValue("Preemption", "1", RegistryValueKind.DWord);
Scheduler.SetValue("EnablePreemption", "0", RegistryValueKind.DWord);
nvlddmkm.SetValue("PerfAnalyzeMidBufferPreemption", "0", RegistryValueKind.DWord);
nvlddmkm.SetValue("EnableMidBufferPreemption", "0", RegistryValueKind.DWord);
nvlddmkm.SetValue("EnableAsyncMidBufferPreemption", "1", RegistryValueKind.DWord);
nvlddmkm.SetValue("DisablePreemption", "1", RegistryValueKind.DWord);
nvlddmkm.SetValue("DisableCudaContextPreemption", "1", RegistryValueKind.DWord);
MessageBox.Show("Disabled Preemption.", "Preemption", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
private void Tweaks_Load(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
try
{
RegistryKey nvlddmkm1 = Registry.LocalMachine.CreateSubKey(@"System\CurrentControlSet\Services\nvlddmkm", RegistryKeyPermissionCheck.ReadWriteSubTree);
if (nvlddmkm1.GetValue("DisableWriteCombining") != null)
{
if (nvlddmkm1.GetValue("DisableWriteCombining").ToString() == "1")
{
if (MessageBox.Show("WriteCombining is already Disabled. Do you want to revert the setting?", "WriteCombining", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
nvlddmkm1.DeleteValue("DisableWriteCombining");
MessageBox.Show("DisableWriteCombining has been reverted", "WriteCombining", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
else
{
nvlddmkm1.SetValue("DisableWriteCombining", "1", RegistryValueKind.DWord);
MessageBox.Show("Disabled WriteCombining.", "WriteCombining", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
private void button4_Click_1(object sender, EventArgs e)
{
// HDCP
//credit TimeCard
RegistryKey Cclass = Registry.LocalMachine.CreateSubKey(@"System\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000", RegistryKeyPermissionCheck.ReadWriteSubTree);
RegistryKey nvlddmkm2 = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\NVAIO", RegistryKeyPermissionCheck.ReadWriteSubTree);
try
{
if (nvlddmkm2.GetValue("HDCP") != null)
{
if (nvlddmkm2.GetValue("HDCP").ToString() == "1")
{
if (MessageBox.Show("HDCP is already Disabled. Do you want to revert??", "HDCP", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
nvlddmkm2.DeleteValue("HDCP");
Cclass.DeleteValue("RMHdcpKeyglobZero");
MessageBox.Show("HCDCP has been enabled", "HDCP", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
else
{
nvlddmkm2.SetValue("HDCP", "1", RegistryValueKind.DWord);
Cclass.SetValue("RMHdcpKeyglobZero", "1", RegistryValueKind.DWord);
MessageBox.Show("Disabled HDCP.", "HDCP", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
private void button14_Click(object sender, EventArgs e)
{
// logging
RegistryKey nvlddmkm2 = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\NVAIO", RegistryKeyPermissionCheck.ReadWriteSubTree);
RegistryKey nvlddmkm = Registry.LocalMachine.CreateSubKey(@"System\CurrentControlSet\Services\nvlddmkm", RegistryKeyPermissionCheck.ReadWriteSubTree);
//"LogWarningEntries"=dword:00000000
// "LogPagingEntries" = dword:00000000
// "LogEventEntries" = dword:00000000
// "LogErrorEntries" = dword:00000000
try
{
if (nvlddmkm2.GetValue("Logging") != null)
{
if (nvlddmkm2.GetValue("Logging").ToString() == "1")
{
if (MessageBox.Show("Logging is already Disabled. Do you want to revert?", "Logging", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
nvlddmkm2.DeleteValue("Logging");
nvlddmkm.DeleteValue("LogWarningEntries");
nvlddmkm.DeleteValue("LogPagingEntries");
nvlddmkm.DeleteValue("LogEventEntries");
nvlddmkm.DeleteValue("LogErrorEntries");
MessageBox.Show("Logging has been reverted to default.", "Logging", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
else
{
nvlddmkm2.SetValue("Logging", "1", RegistryValueKind.DWord);
nvlddmkm.SetValue("LogWarningEntries", "0", RegistryValueKind.DWord);
nvlddmkm.SetValue("LogPagingEntries", "0", RegistryValueKind.DWord);
nvlddmkm.SetValue("LogEventEntries", "0", RegistryValueKind.DWord);
nvlddmkm.SetValue("LogErrorEntries", "0", RegistryValueKind.DWord);
MessageBox.Show("Disabled Logging.", "Logging", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
private void button13_Click(object sender, EventArgs e)
{
// PowerMizer Dwords (kboost)
RegistryKey Cclass = Registry.LocalMachine.CreateSubKey(@"System\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000", RegistryKeyPermissionCheck.ReadWriteSubTree);
RegistryKey nvlddmkm2 = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\NVAIO", RegistryKeyPermissionCheck.ReadWriteSubTree);
//"PerfLevelSrc"=dword:00002222
//"EnableMClkSlowdown" = dword:00000000
// "EnableNVClkSlowdown" = dword:00000000
// "PowerMizerLevelAC" = dword:00000001
//"PowerMizerEnable" = dword:00000001
//"PowerMizerLevel" = dword:00000001
//"EnableCoreSlowdown" = dword:00000000
try
{
if (nvlddmkm2.GetValue("PowerMizer") != null)
{
if (nvlddmkm2.GetValue("PowerMizer").ToString() == "1")
{
if (MessageBox.Show("PowerMizer Dwords have already been enabled. Do you want to Revert them?", "PowerMizer", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
nvlddmkm2.DeleteValue("PowerMizer");
Cclass.DeleteValue("PerfLevelSrc");
Cclass.DeleteValue("EnableMClkSlowdown");
Cclass.DeleteValue("EnableNVClkSlowdown");
Cclass.DeleteValue("PowerMizerLevelAC");
Cclass.DeleteValue("PowerMizerEnable");
Cclass.DeleteValue("PowerMizerLevel");
Cclass.DeleteValue("EnableCoreSlowdown");
MessageBox.Show("PowerMizer Dwords have been deleted", "PowerMizer", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
else
{
nvlddmkm2.SetValue("PowerMizer", "1", RegistryValueKind.DWord);
Cclass.SetValue("EnableMClkSlowdown", "0", RegistryValueKind.DWord);
Cclass.SetValue("EnableNVClkSlowdown", "0", RegistryValueKind.DWord);
Cclass.SetValue("PowerMizerLevelAC", "1", RegistryValueKind.DWord);
Cclass.SetValue("PowerMizerEnable", "1", RegistryValueKind.DWord);
Cclass.SetValue("PowerMizerLevel", "1", RegistryValueKind.DWord);
Cclass.SetValue("EnableCoreSlowdown", "0", RegistryValueKind.DWord);
Cclass.SetValue("PerfLevelSrc", "8738", RegistryValueKind.DWord);
MessageBox.Show("Imported PowerMizer Dwords.", "PowerMizer", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
private void button16_Click(object sender, EventArgs e)
{
// Disable Scaling // needs fix //
WebClient DefaultSettings = new WebClient();
DefaultSettings.DownloadFile("https://cdn.discordapp.com/attachments/833399334019530814/845056590972452870/real_display_scaling.bat", "C:\\Windows\\Temp\\real_display_scaling.bat");
Process unr = new Process();
unr.StartInfo.FileName = "C:\\Windows\\Temp\\real_display_scaling.bat";
unr.StartInfo.UseShellExecute = false;
unr.StartInfo.RedirectStandardInput = true;
unr.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
unr.Start();
unr.WaitForExit();
MessageBox.Show("No Scaling has been succesfully set!", "Real Scaling", MessageBoxButtons.OK, MessageBoxIcon.Information);
Process deletebat = new Process();
deletebat.StartInfo.FileName = "cmd.exe";
deletebat.StartInfo.Arguments = @"/c del /f C:\Windows\Temp\real_display_scaling.bat";
deletebat.StartInfo.UseShellExecute = false;
deletebat.StartInfo.RedirectStandardInput = true;
deletebat.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
deletebat.Start();
deletebat.WaitForExit();
}
private void button3_Click_1(object sender, EventArgs e)
{
// Misc Dwords
RegistryKey Cclass = Registry.LocalMachine.CreateSubKey(@"System\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000", RegistryKeyPermissionCheck.ReadWriteSubTree);
RegistryKey nvlddmkm2 = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\NVAIO", RegistryKeyPermissionCheck.ReadWriteSubTree);
RegistryKey nvlddmkm = Registry.LocalMachine.CreateSubKey(@"System\CurrentControlSet\Services\nvlddmkm", RegistryKeyPermissionCheck.ReadWriteSubTree);
RegistryKey Scheduler = Registry.LocalMachine.CreateSubKey(@"System\CurrentControlSet\Control\GraphicsDrivers\Scheduler", RegistryKeyPermissionCheck.ReadWriteSubTree);
RegistryKey NVTweak = Registry.LocalMachine.CreateSubKey(@"System\CurrentControlSet\Services\nvlddmkm\Global\NVTweak", RegistryKeyPermissionCheck.ReadWriteSubTree);
try
{
if (nvlddmkm2.GetValue("MISC") != null)
{
if (nvlddmkm2.GetValue("MISC").ToString() == "1")
{
if (MessageBox.Show("Dwords Have already been applied, Do you want to revert?", "Misc", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
nvlddmkm2.DeleteValue("MISC");
nvlddmkm.DeleteValue("EnableMemoryTiling");
nvlddmkm.DeleteValue("EnableSystemMemoryTiling");
Cclass.DeleteValue("EnableTiledDisplay");
Cclass.DeleteValue("RmDisableHwFaultBuffer");
Cclass.DeleteValue("EnableRuntimePowerManagement");
Cclass.DeleteValue("DisableOverlay");
NVTweak.DeleteValue("DisplayPowerSaving");
MessageBox.Show("Dwords Deleted.", "Misc", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
else
{
nvlddmkm2.SetValue("MISC", "1", RegistryValueKind.DWord);
nvlddmkm.SetValue("EnableMemoryTiling", "0", RegistryValueKind.DWord);
nvlddmkm.SetValue("EnableSystemMemoryTiling", "0", RegistryValueKind.DWord);
Cclass.SetValue("EnableTiledDisplay", "0", RegistryValueKind.DWord);
Cclass.SetValue("RmDisableHwFaultBuffer", "1", RegistryValueKind.DWord);
Cclass.SetValue("EnableRuntimePowerManagement", "0", RegistryValueKind.DWord);
Cclass.SetValue("DisableOverlay", "1", RegistryValueKind.DWord);
NVTweak.SetValue("DisplayPowerSaving", "0", RegistryValueKind.DWord);
MessageBox.Show("Added Dwords.", "Misc", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
}
}