forked from aleksk/LazyCopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LazyCopyDriver.inf
123 lines (102 loc) · 3.88 KB
/
LazyCopyDriver.inf
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
;;;
;;; LazyCopy Driver.
;;;
;;; The MIT License (MIT)
;;;
;;; Copyright (c) 2015 Aleksey Kabanov
;;;
;;; Permission is hereby granted, free of charge, to any person obtaining a copy
;;; of this software and associated documentation files (the "Software"), to deal
;;; in the Software without restriction, including without limitation the rights
;;; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
;;; copies of the Software, and to permit persons to whom the Software is
;;; furnished to do so, subject to the following conditions:
;;;
;;; The above copyright notice and this permission notice shall be included in
;;; all copies or substantial portions of the Software.
;;;
;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
;;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
;;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
;;; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
;;; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
;;; THE SOFTWARE.
;;;
[Version]
Signature = "$Windows NT$"
Class = "ActivityMonitor"
ClassGuid = {b86dff51-a31e-4bac-b3cf-e8cfe75c9fc2}
Provider = %ManufacturerName%
DriverPackageType = FileSystemMinifilter
DriverVer = 12/26/2016,1.0.0.0
CatalogFile = LazyCopyDriver.cat
[DestinationDirs]
DefaultDestDir = 12
MiniFilter.DriverFiles = 12 ; %windir%\system32\drivers
;;
;; Copy files sections.
;;
[MiniFilter.DriverFiles]
%DriverName%.sys
[SourceDisksFiles]
LazyCopyDriver.sys = 1,,
[SourceDisksNames]
1 = %DiskId1%,,,
;;
;; Default install sections.
;;
[DefaultInstall]
OptionDesc = %ServiceDescription%
CopyFiles = MiniFilter.DriverFiles
[DefaultInstall.Services]
AddService = %ServiceName%,,MiniFilter.Service
;;
;; Default uninstall sections.
;;
[DefaultUninstall]
DelFiles = MiniFilter.DriverFiles
DelReg = MiniFilter.Registry
[DefaultUninstall.Services]
DelService = %ServiceName%,0x200 ; Ensure service is stopped before deleting.
;;
;; Services sections.
;;
[MiniFilter.Service]
DisplayName = %ServiceName%
Description = %ServiceDescription%
ServiceBinary = %12%\%DriverName%.sys ; %windir%\system32\drivers\
Dependencies = FltMgr
ServiceType = 2 ; SERVICE_FILE_SYSTEM_DRIVER
StartType = 1 ; SERVICE_SYSTEM_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
LoadOrderGroup = "FSFilter Activity Monitor"
AddReg = MiniFilter.Registry
;;
;; Registry modification sections.
;;
[MiniFilter.Registry]
HKR,,"DebugFlags",0x00010001,0x0
HKR,,"SupportedFeatures",0x00010001,0x3
HKR,"Instances","DefaultInstance",0x00000000,%DefaultInstance%
HKR,"Instances\"%Instance1.Name%,"Altitude",0x00000000,%Instance1.Altitude%
HKR,"Instances\"%Instance1.Name%,"Flags",0x00010001,%Instance1.Flags%
; Driver-specific keys.
HKR,,"OperationMode",0x00010001,0x1 ; REG_DWORD, 1 - FetchEnabled.
HKR,,"ReportRate",0x00010001,0x2710 ; REG_DWORD, Event rate per 10k calls.
HKR,,"WatchPaths",0x00010000,"" ; REG_MULTI_SZ
;;
;; String sections.
;;
;; TODO: Update the information below.
[Strings]
ManufacturerName = "Contoso"
ServiceDescription = "Driver for fetching files lazily from the remote source"
ServiceName = "LazyCopyDriver"
DriverName = "LazyCopyDriver"
DiskId1 = "LazyCopy Driver Installation Disk"
; Instances-specific information.
DefaultInstance = "LazyCopyDriver"
Instance1.Name = "LazyCopyDriver"
Instance1.Altitude = "180610" ; TODO: Before releasing your driver, make sure you contact Microsoft to register it and get this value.
Instance1.Flags = 0x0 ; Automatically attach.