1 | ; $Id: VBoxWHQLFake.au3 96407 2022-08-22 17:43:14Z vboxsync $
|
---|
2 | ;; @file
|
---|
3 | ; VBoxFakeWHQL - Turns off / on the WHQL for installing unsigned drivers.
|
---|
4 | ; Currently only tested with Win2K / XP!
|
---|
5 | ;
|
---|
6 |
|
---|
7 | ;
|
---|
8 | ; Copyright (C) 2008-2022 Oracle and/or its affiliates.
|
---|
9 | ;
|
---|
10 | ; This file is part of VirtualBox base platform packages, as
|
---|
11 | ; available from https://www.alldomusa.eu.org.
|
---|
12 | ;
|
---|
13 | ; This program is free software; you can redistribute it and/or
|
---|
14 | ; modify it under the terms of the GNU General Public License
|
---|
15 | ; as published by the Free Software Foundation, in version 3 of the
|
---|
16 | ; License.
|
---|
17 | ;
|
---|
18 | ; This program is distributed in the hope that it will be useful, but
|
---|
19 | ; WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
20 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
21 | ; General Public License for more details.
|
---|
22 | ;
|
---|
23 | ; You should have received a copy of the GNU General Public License
|
---|
24 | ; along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
25 | ;
|
---|
26 | ; SPDX-License-Identifier: GPL-3.0-only
|
---|
27 | ;
|
---|
28 |
|
---|
29 | ; Strings for localization
|
---|
30 | ; When using an OS with another language, you have to provide the correct
|
---|
31 | ; strings for it. English and German is provided below.
|
---|
32 | ;
|
---|
33 | ; @todo Needs to be improved to handle the stuff without language strings in
|
---|
34 | ; the future!
|
---|
35 |
|
---|
36 | ;$sysprop_Title = "System Properties"
|
---|
37 | ;$drvsig_Title = "Driver Signing Options"
|
---|
38 |
|
---|
39 | $sysprop_Title = "Systemeigenschaften"
|
---|
40 | $drvsig_Title = "Treibersignaturoptionen"
|
---|
41 |
|
---|
42 | $ok_Title = "OK"
|
---|
43 |
|
---|
44 | If $CmdLine[0] < 1 Then
|
---|
45 | MsgBox ( 0, "ERROR", "Please specify 'ignore', 'warn' or 'block' as parameter!" )
|
---|
46 | Exit
|
---|
47 | EndIf
|
---|
48 |
|
---|
49 | Run("control.exe sysdm.cpl")
|
---|
50 | If WinWait($sysprop_Title, "", 5) = 0 Then
|
---|
51 | WinClose("[ACTIVE]", "")
|
---|
52 | Exit
|
---|
53 | EndIf
|
---|
54 |
|
---|
55 | ControlCommand($sysprop_Title, "", "SysTabControl321", "TabRight", "")
|
---|
56 | ControlCommand($sysprop_Title, "", "SysTabControl321", "TabRight", "")
|
---|
57 |
|
---|
58 | Sleep(200) ; Wait a while for tab switching above
|
---|
59 | ControlClick($sysprop_Title, "", 14007) ; Button 'Driver Signing'
|
---|
60 |
|
---|
61 | WinWait($drvsig_Title, "", 5)
|
---|
62 |
|
---|
63 | If $CmdLine[1] = "ignore" Then
|
---|
64 | ControlClick($drvsig_Title, "", 1000) ; 'Ignore' radio button
|
---|
65 | ElseIf $CmdLine[1] = "warn" Then
|
---|
66 | ControlClick($drvsig_Title, "", 1001) ; 'Warn' radio button
|
---|
67 | ElseIf $CmdLine[1] = "block" Then
|
---|
68 | ControlClick($drvsig_Title, "", 1002) ; 'Block' radio button
|
---|
69 | Else
|
---|
70 | Exit
|
---|
71 | EndIf
|
---|
72 |
|
---|
73 | ControlClick($drvsig_Title, "", 1) ; 'OK' button (ID=1) of dialog 'Driver Signing Options'
|
---|
74 |
|
---|
75 | WinWait($sysprop_Title, "", 5)
|
---|
76 | ControlClick($sysprop_Title, "", 1) ; 'OK' button (ID=1) of 'System Properties'
|
---|
77 |
|
---|