|
@@ -0,0 +1,12 @@
|
|
1
|
+@echo off
|
|
2
|
+
|
|
3
|
+rem Escalate to administrator privileges
|
|
4
|
+powershell -Command "Start-Process cmd -Verb runAs"
|
|
5
|
+
|
|
6
|
+rem Add Task Scheduler entry
|
|
7
|
+schtasks /create /tn "KBRemover" /tr "powershell -File C:\MCW\KBRemover.ps1" /sc DAILY /st 07:00 /ru System
|
|
8
|
+
|
|
9
|
+rem If the task fails to run, it will run on the next computer startup
|
|
10
|
+schtasks /create /tn "KBRemover" /tr "powershell -File C:\MCW\KBRemover.ps1" /sc ONSTART /ru System
|
|
11
|
+
|
|
12
|
+echo Task Scheduler entry created successfully.
|