hivex: example6: Hypothetical addition of keys for viostor.
[libguestfs.git] / hivex / example6
1 #!/bin/bash -
2 # Copyright (C) 2009-2010 Red Hat Inc.
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 set -e
19
20 # Hypothetical viostor installation in a W2K3 system registry.
21
22 if [ $# -ne 2 ]; then
23     echo "$0 system system.new"
24     exit 1
25 fi
26
27 d=`dirname $0`
28
29 $d/hivexsh -w <<EOF
30 load $1
31
32 cd \ControlSet001\Control\CriticalDeviceDatabase
33
34 add pci#ven_1af4&dev_1001&subsys_00000000
35 cd pci#ven_1af4&dev_1001&subsys_00000000
36 setval 2
37 Service
38 string:viostor
39 ClassGUID
40 string:{4D36E97B-E325-11CE-BFC1-08002BE10318}
41 cd ..
42
43 add pci#ven_1af4&dev_1001&subsys_00020000
44 cd pci#ven_1af4&dev_1001&subsys_00020000
45 setval 2
46 Service
47 string:viostor
48 ClassGUID
49 string:{4D36E97B-E325-11CE-BFC1-08002BE10318}
50 cd ..
51
52 add pci#ven_1af4&dev_1001&subsys_00021af4
53 cd pci#ven_1af4&dev_1001&subsys_00021af4
54 setval 2
55 Service
56 string:viostor
57 ClassGUID
58 string:{4D36E97B-E325-11CE-BFC1-08002BE10318}
59
60 cd \ControlSet001\Services
61 add viostor
62 cd viostor
63 setval 6
64 Type
65 dword:0x00000001
66 Start
67 dword:0x00000000
68 Group
69 string:SCSI miniport
70 ErrorControl
71 dword:0x00000001
72 ImagePath
73 string:system32\\drivers\\viostor.sys
74 Tag
75 dword:0x00000021
76
77 add Parameters
78 cd Parameters
79 setval 1
80 BusType
81 dword:0x00000001
82
83 add MaxTransferSize
84 cd MaxTransferSize
85 setval 3
86 ParamDesc
87 string:Maximum Transfer Size
88 type
89 string:enum
90 default
91 string:0
92
93 add enum
94 cd enum
95 setval 3
96 0
97 string:64  KB
98 1
99 string:128 KB
100 2
101 string:256 KB
102 cd ..
103
104 cd ..
105
106 add PnpInterface
107 cd PnpInterface
108 setval 1
109 5
110 dword:0x00000001
111 cd ..
112
113 cd ..
114
115 add Enum
116 cd Enum
117 setval 3
118 0
119 string:PCI\VEN_1AF4&DEV_1001&SUBSYS_00021AF4&REV_00\3&13c0b0c5&0&20
120 Count
121 dword:0x00000001
122 NextInstance
123 dword:0x00000001
124
125 commit $2
126 EOF