-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathNvidia-Gamestream-Disable-Scanning.bat
89 lines (59 loc) · 3.07 KB
/
Nvidia-Gamestream-Disable-Scanning.bat
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
@echo off
::: STOPPING SERVICES :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo Killing NVIDIA Services to resolve file lock...
sc stop "NVDisplay.ContainerLocalSystem"
sc stop "NvContainerLocalSystem"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
timeout 5 > NUL
cls
::: SET DIRECTORY AND START TEXT EDITOR :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo Opening config.xml. Amend value 'EnableAutomaticApplicationScan' from '1' to '0'. Save, and then close.
timeout 2 > NUL
cd %APPDATA%/../Local/NVIDIA/NvBackend/
attrib -r "config.xml"
start /wait notepad.exe "%APPDATA%/../Local/NVIDIA/NvBackend/config.xml"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
timeout 2 > NUL
cls
:: BACKUP AND RECREATE VISUALOPSDATA ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo Backing up existing 'VisualOPSData'...
ren VisualOPSData backup_VisualOPSData
mkdir "VisualOPSData"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
timeout 2 > NUL
cls
:: SET READONLY ATTRIBUTE :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo Setting file and folder attributes appropriately...
attrib +r "VisualOPSData"
attrib -r "journalBS.jour.dat"
attrib -r "journalBS.main.xml"
attrib +r "config.xml"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
timeout 2 > NUL
cls
::: BACKUP EXISTING DATA ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo Backing up existing 'JournalBS' data...
ren journalBS.jour.dat backup_journalBS.jour.dat
ren journalBS.main.xml backup_journalBS.main.xml
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
timeout 2 > NUL
cls
::: DISABLING ONTOLOGY TO FINISH UP :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::: otherwise NvBackend will rebuild OPSData on app launch using ontology catalogue thus leading to duplicates
echo Disabling NVIDIA 'Applications Ontology' feature...
cd ApplicationOntology
ren Ontology64.dll Ontology64.dll.bak
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
timeout 2 > NUL
cls
::: RESTARTING SERVICES :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo Restarting NVIDIA Services...
sc start "NVDisplay.ContainerLocalSystem"
sc start "NvContainerLocalSystem"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
timeout 2 > NUL
cls
::: EXIT ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo Job completed. Exiting...
timeout 2 > NUL
exit