Browse Source

Add 'KBRemover-TaskAdder.bat'

Ethan 2 years ago
parent
commit
f7d0a46e60
1 changed files with 12 additions and 0 deletions
  1. 12
    0
      KBRemover-TaskAdder.bat

+ 12
- 0
KBRemover-TaskAdder.bat View File

@@ -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.

Powered by TurnKey Linux.