forked from oddstr13/aegis-voat
-
Notifications
You must be signed in to change notification settings - Fork 1
/
disable10.cmd
69 lines (59 loc) · 1.79 KB
/
disable10.cmd
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
@echo off
Echo MICROSOFT TOOL KIT TO DISABLE DELIVERY OF
Echo MICROSOFT INTERNET EXPLORER 10
Echo.
Echo Copyright (C) Microsoft Corporation. All rights reserved.
Echo.
set ProductName=Internet Explorer 10
set REGBlockKey=HKLM\SOFTWARE\Microsoft\Internet Explorer\Setup\10.0
set REGBlockValue=DoNotAllowIE10
set RemoteMachine=%1
if ""=="%1" goto Usage
if "/?"=="%1" goto Usage
if /I "/H"=="%1" goto Usage
if /I "/B"=="%1" goto LocalMachine
if /I "/U"=="%1" goto LocalMachine
set RemoteMachineName=%1
set Action=%2
:Parse
if /I "/B" == "%Action%" goto Block
if /I "/U" == "%Action%" goto UnBlock
goto Usage
:Block
Echo Blocking deployment of %ProductName% on %RemoteMachineName%
REG ADD "\\%RemoteMachine%\%REGBlockKey%" /v %REGBlockValue% /t REG_DWORD /d 1 /f
goto End
:UnBlock
Echo Unblocking deployment of %ProductName% on %RemoteMachineName%
REG DELETE "\\%RemoteMachine%\%REGBlockKey%" /v %REGBlockValue% /f
goto End
:LocalMachine
echo LOCAL!
set Action=%1
set RemoteMachine=.
set RemoteMachineName=the local machine
goto Parse
:Usage
Echo.
Echo This tool can be used to remotely block or unblock the delivery of
Echo %ProductName% via Automatic Updates.
Echo.
Echo ------------------------------------------------------------
Echo Usage:
Echo %0 [machine name] [/B] [/U] [/H]
REM [machine name] [/B|U|H]
Echo B = Block %ProductName% deployment
Echo U = Allow %ProductName% deployment
Echo H = Help
Echo.
Echo To block or unblock installation on the local machine use
Echo period ("." with no quotes) as the machine name
Echo.
Echo Examples:
Echo %0 mymachine /B (blocks delivery on machine "mymachine")
Echo.
Echo %0 /U (unblocks delivery on the local machine)
Echo ------------------------------------------------------------
Echo.
:End
exit