|
|
1.1 root 1: ;-----------------------------------------------------------------------
2: ; OPTION TYPE
3: ; -----------
4: ; This identifies the Option type we are dealing with. The different
5: ; possible types are:
6: ;
7: ; COMPUTER, VIDEO, POINTER, KEYBOARD, LAYOUT, SCSI, PRINTER, ...
8: ;-----------------------------------------------------------------------
9:
10: [Identification]
11: OptionType = POINTER
12:
13: ;-----------------------------------------------------------------------
14: ; LANGUAGES SUPPORTED
15: ; -------------------
16: ;
17: ; The languages supported by the INF, For every language supported
18: ; we need to have a separate text section for every displayable text
19: ; section.
20: ;
21: ;-----------------------------------------------------------------------
22:
23: [LanguagesSupported]
24: ENG
25:
26: ;-----------------------------------------------------------------------
27: ; OPTION LIST
28: ; -----------
29: ; This section lists the Option key names. These keys are locale
30: ; independent and used to represent the option in a locale independent
31: ; manner.
32: ;
33: ;-----------------------------------------------------------------------
34:
35: [Options]
36: OEMSERMOUSE = oemmouse , oemmoucs
37:
38:
39:
40: ;
41: ; This maps detected options into the options we support
42: ;
43: ; Format: DetectedOption = MappedOption
44: ;
45:
46: [MapOfOptions]
47: "MICROSOFT PS2 MOUSE" = "MICROSOFT PS2 MOUSE"
48: "MICROSOFT SERIAL MOUSE" = "MICROSOFT SERIAL MOUSE"
49: "MICROSOFT INPORT MOUSE" = "MICROSOFT INPORT MOUSE"
50: "MICROSOFT BUS MOUSE" = "MICROSOFT BUS MOUSE"
51: "MICROSOFT BALLPOINT SERIAL MOUSE" = "MICROSOFT BALLPOINT SERIAL MOUSE"
52: "MICROSOFT BALLPOINT PS2 MOUSE" = "MICROSOFT BALLPOINT PS2 MOUSE"
53: "LOGITEC PS2 MOUSE" = "LOGITEC PS2 MOUSE"
54: "LOGITEC SERIAL MOUSE" = "LOGITEC SERIAL MOUSE"
55: NONE = NONE
56: UNKNOWN = UNKNOWN
57:
58:
59: ;
60: ; Order of the information:
61: ;
62: ; Port driver = Type, Group, ErrorControl, Tag, EventMessageFile, TypesSupported
63: ;
64:
65: [PortDrivers]
66:
67: oemmouse = !SERVICE_KERNEL_DRIVER, "Pointer Port", !SERVICE_ERROR_NORMAL, 2, "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\drivers\oemmouse.sys" , 7
68:
69: ;
70: ; Order of the information:
71: ;
72: ; Class driver = Type, Group, ErrorControl, Tag, EventMessageFile, TypesSupported
73: ;
74:
75: [ClassDrivers]
76:
77: oemmoucs = !SERVICE_KERNEL_DRIVER, "Pointer Class", !SERVICE_ERROR_NORMAL, 1, "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\drivers\oemmoucs.sys" , 7
78:
79:
80: ;-----------------------------------------------------------------------
81: ; OPTION TEXT SECTION
82: ; -------------------
83: ; These are text strings used to identify the option to the user. There
84: ; are separate sections for each language supported. The format of the
85: ; section name is "OptionsText" concatenated with the Language represented
86: ; by the section.
87: ;
88: ;-----------------------------------------------------------------------
89:
90: [OptionsTextENG]
91: OEMSERMOUSE = "OEM for Microsoft Serial Mouse"
92:
93: ;---------------------------------------------------------------------------
94: ; 1. Identify
95: ;
96: ; DESCRIPTION: To verify that this INF deals with the same type of options
97: ; as we are choosing currently.
98: ;
99: ; INPUT: None
100: ;
101: ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
102: ; $($R1): Option Type (COMPUTER ...)
103: ; $($R2): Diskette description
104: ;---------------------------------------------------------------------------
105:
106: [Identify]
107: ;
108: ;
109: read-syms Identification
110:
111: set Status = STATUS_SUCCESSFUL
112: set Identifier = $(OptionType)
113: set Media = #("Source Media Descriptions", 1, 1)
114:
115: Return $(Status) $(Identifier) $(Media)
116:
117:
118:
119: ;------------------------------------------------------------------------
120: ; 2. ReturnOptions:
121: ;
122: ; DESCRIPTION: To return the option list supported by this INF and the
123: ; localised text list representing the options.
124: ;
125: ;
126: ; INPUT: $($0): Language used. ( ENG | FRN | ... )
127: ;
128: ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
129: ; STATUS_NOLANGUAGE
130: ; STATUS_FAILED
131: ;
132: ; $($R1): Option List
133: ; $($R2): Option Text List
134: ;------------------------------------------------------------------------
135:
136: [ReturnOptions]
137: ;
138: ;
139: set Status = STATUS_FAILED
140: set OptionList = {}
141: set OptionTextList = {}
142:
143: ;
144: ; Check if the language requested is supported
145: ;
146: set LanguageList = ^(LanguagesSupported, 1)
147: Ifcontains(i) $($0) in $(LanguageList)
148: goto returnoptions
149: else
150: set Status = STATUS_NOLANGUAGE
151: goto finish_ReturnOptions
152: endif
153:
154: ;
155: ; form a list of all the options and another of the text representing
156: ;
157:
158: returnoptions = +
159: set OptionList = ^(Options, 0)
160: set OptionTextList = ^(OptionsText$($0), 1)
161: set Status = STATUS_SUCCESSFUL
162:
163: finish_ReturnOptions = +
164: Return $(Status) $(OptionList) $(OptionTextList)
165:
166:
167: ;---------------------------------------------------------------------------
168: ; MapToSupportedOption
169: ;
170: ; DESCRIPTION: To map a hardware detected option to the NT Supported
171: ; option which represents it.
172: ;
173: ; INPUT: $($0): Option
174: ;
175: ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
176: ; $($R1): Mapped Option
177: ;
178: ;---------------------------------------------------------------------------
179:
180: [MapToSupportedOption]
181: ;
182: set Status = STATUS_FAILED
183: set MappedOption = $($0)
184:
185: ;
186: ; If the option is one we can support using one of our standard options
187: ; then map it to the standard option. If not just pass it back as an
188: ; unknown option
189: ;
190:
191: set OptionList = ^(MapOfOptions, 0)
192: ifcontains $($0) in $(OptionList)
193: set MappedOption = #(MapOfOptions, $($0), 1)
194: else
195: set MappedOption = "UNKNOWN"
196: endif
197:
198: set Status = STATUS_SUCCESSFUL
199: Return $(Status) $(MappedOption)
200:
201:
202: [ServicesEntry]
203: CurrentPortEntry = "" ? $(!LIBHANDLE) GetDevicemapValue PointerPort \Device\PointerPort0
204: CurrentClassEntry = "" ? $(!LIBHANDLE) GetDevicemapValue PointerClass \Device\PointerClass0
205:
206: ;
207: ; InstallOption:
208: ;
209: ; FUNCTION: To copy files representing Options
210: ; To configure the installed option
211: ; To update the registry for the installed option
212: ;
213: ; INPUT: $($0): Language to use
214: ; $($1): OptionID to install
215: ; $($2): SourceDirectory
216: ; $($3): AddCopy (YES | NO)
217: ; $($4): DoCopy (YES | NO)
218: ; $($5): DoConfig (YES | NO)
219: ;
220: ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
221: ; STATUS_NOLANGUAGE |
222: ; STATUS_USERCANCEL |
223: ; STATUS_FAILED
224: ;
225:
226: [InstallOption]
227:
228: ;
229: ; Set default values for
230: ;
231: set Status = STATUS_FAILED
232: set DrivesToFree = {}
233:
234: ;
235: ; extract parameters
236: ;
237: set Option = $($1)
238: set SrcDir = $($2)
239: set AddCopy = $($3)
240: set DoCopy = $($4)
241: set DoConfig = $($5)
242:
243: ;
244: ; Check if the language requested is supported
245: ;
246: set LanguageList = ^(LanguagesSupported, 1)
247: Ifcontains(i) $($0) in $(LanguageList)
248: else
249: set Status = STATUS_NOLANGUAGE
250: goto finish_InstallOption
251: endif
252: read-syms Strings$($0)
253:
254: ;
255: ; check to see if Option is supported.
256: ;
257:
258: set OptionList = ^(Options, 0)
259: ifcontains $(Option) in $(OptionList)
260: else
261: goto finish_InstallOption
262: endif
263: set OptionList = ""
264:
265: ;
266: ; find out the current pointer port and class services entries,
267: ; and the new port driver and class driver to install
268: ;
269:
270: read-syms ServicesEntry
271: detect ServicesEntry
272:
273: Debug-Output "POINTER.INF: Current Port Entry is: "$(CurrentPortEntry)
274: Debug-Output "POINTER.INF: Current Class Entry is: "$(CurrentClassEntry)
275:
276: set PortDriver = #(Options, $(Option), 1)
277: set ClassDriver = #(Options, $(Option), 2)
278:
279: Debug-Output "POINTER.INF: New Port Entry is: "$(PortDriver)
280: Debug-Output "POINTER.INF: New Class Entry is: "$(ClassDriver)
281:
282: ;
283: ; Check if current option is NONE or UNKNOWN, then we don't need to copy
284: ; any files. Set the AddCopy and DoCopy variables to NO
285: ;
286:
287: ifstr(i) $(Option) == NONE
288: set AddCopy = NO
289: set DoCopy = NO
290: else-ifstr(i) $(Option) == UNKNOWN
291: set AddCopy = NO
292: set DoCopy = NO
293: endif
294:
295:
296: installtheoption = +
297:
298: ;
299: ; Code to add files to copy list
300: ;
301:
302: ifstr(i) $(AddCopy) == "YES"
303: set DoActualCopy = NO
304: set FileToCheck = #(Files-MousePortDrivers, $(PortDriver), 2)
305: LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
306: ifstr(i) $(STATUS) == NO
307: set DoActualCopy = YES
308: else
309: set FileToCheck = #(Files-MouseClassDrivers, $(ClassDriver), 2)
310: LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
311: ifstr(i) $(STATUS) == NO
312: set DoActualCopy = YES
313: endif
314: endif
315:
316: ifstr(i) $(DoActualCopy) == NO
317: shell "subroutn.inf" DriversExist $($0) $(String1)
318: ifint $($ShellCode) != $(!SHELL_CODE_OK)
319: Debug-Output "POINTER.INF: shelling DriversExist failed"
320: goto finish_InstallOption
321: endif
322:
323: ifstr(i) $($R0) == STATUS_CURRENT
324: else-ifstr(i) $($R0) == STATUS_NEW
325: set DoActualCopy = YES
326: else-ifstr(i) $($R0) == STATUS_USERCANCEL
327: Debug-Output "POINTER.INF: User cancelled Pointer installation"
328: goto finish_InstallOption
329: else
330: Debug-Output "POINTER.INF: Error reported in DriversExist routine in SUBROUTN.INF"
331: goto finish_InstallOption
332: endif
333: endif
334:
335: ifstr(i) $(DoActualCopy) == YES
336:
337: shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2)
338: ifint $($ShellCode) != $(!SHELL_CODE_OK)
339: Debug-Output "POINTER.INF: shelling DoAskSourceEx failed"
340: goto finish_InstallOption
341: endif
342:
343: ifstr(i) $($R0) == STATUS_SUCCESSFUL
344: set SrcDir = $($R1)
345: ifstr(i) $($R2) != ""
346: set DrivesToFree = >($(DrivesToFree), $($R2))
347: endif
348: else
349: Debug-Output "POINTER.INF: User cancelled asking source."
350: goto finish_InstallOption
351: endif
352:
353: install Install-AddCopyOption
354: ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
355: Debug-Output "POINTER.INF: Adding mouse files to copy list failed"
356: goto finish_InstallOption
357: endif
358: else
359: set DoCopy = NO
360: endif
361:
362: endif
363:
364: ifstr(i) $(DoCopy) == "YES"
365: read-syms ProgressCopy$($0)
366: install Install-DoCopyOption
367: ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
368: Debug-Output "POINTER.INF: Copying files failed"
369: goto finish_InstallOption
370: else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
371: set Status = STATUS_USERCANCEL
372: goto finish_InstallOption
373: endif
374: endif
375:
376: ifstr(i) $(DoConfig) == "YES"
377: ;
378: ; first run a privilege check on modifying the setup node
379: ;
380:
381: shell "registry.inf" CheckSetupModify
382: ifint $($ShellCode) != $(!SHELL_CODE_OK)
383: goto finish_InstallOption
384: endif
385:
386: ifstr(i) $($R0) != STATUS_SUCCESSFUL
387: goto finish_InstallOption
388: endif
389:
390: ;
391: ; then make a new pointer port entry, the entry is created automatically
392: ; enabled
393: ;
394:
395: ifstr(i) $(PortDriver) != ""
396:
397: set ServiceNode = $(PortDriver)
398: set ServiceBinary = %SystemRoot%\System32\drivers\#(Files-MousePortDrivers, $(PortDriver), 2)
399:
400: set Type = $(#(PortDrivers, $(PortDriver), 1))
401: set Group = #(PortDrivers, $(PortDriver), 2)
402: set ErrorControl = $(#(PortDrivers, $(PortDriver), 3))
403: set Tag = #(PortDrivers, $(PortDriver), 4)
404: set EventMessageFile = #(PortDrivers, $(PortDriver), 5)
405: set TypesSupported = #(PortDrivers, $(PortDriver), 6)
406:
407: set ServicesValues = { +
408: {Type, 0, $(!REG_VT_DWORD), $(Type) }, +
409: {Start, 0, $(!REG_VT_DWORD), $(!SERVICE_SYSTEM_START) }, +
410: {Group, 0, $(!REG_VT_SZ), $(Group) }, +
411: {ErrorControl, 0, $(!REG_VT_DWORD), $(ErrorControl) }, +
412: {Tag, 0, $(!REG_VT_DWORD), $(Tag) }, +
413: {BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary) } +
414: }
415: set ParametersValues = ""
416: set DeviceValues = {}
417: set EventLogValues = { +
418: {EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, +
419: {TypesSupported, 0, $(!REG_VT_DWORD), $(TypesSupported) } +
420: }
421:
422:
423: shell "registry.inf" MakeServicesEntry $(ServiceNode) +
424: $(ServicesValues) +
425: $(ParametersValues) +
426: $(DeviceValues) +
427: $(EventLogValues) +
428: Parameters
429:
430: ifint $($ShellCode) != $(!SHELL_CODE_OK)
431: Debug-Output "POINTER.INF: Couldn't execute MakeServicesEntry in registry.inf"
432: goto errorconfig
433: endif
434:
435: ifstr(i) $($R0) != STATUS_SUCCESSFUL
436: Debug-Output "POINTER.INF: MakeServicesEntry failed for pointer"
437: goto errorconfig
438: endif
439:
440: endif
441:
442: ;
443: ; then make a new class entry, the entry is created
444: ;
445:
446: ifstr(i) $(ClassDriver) != ""
447:
448: set ServiceNode = $(ClassDriver)
449: set ServiceBinary = %SystemRoot%\System32\drivers\#(Files-MouseClassDrivers, $(ClassDriver), 2)
450:
451: set Type = $(#(ClassDrivers, $(ClassDriver), 1))
452: set Group = #(ClassDrivers, $(ClassDriver), 2)
453: set ErrorControl = $(#(ClassDrivers, $(ClassDriver), 3))
454: set Tag = #(ClassDrivers, $(ClassDriver), 4)
455: set EventMessageFile = #(ClassDrivers, $(ClassDriver), 5)
456: set TypesSupported = #(ClassDrivers, $(ClassDriver), 6)
457:
458: set ServicesValues = { +
459: {Type, 0, $(!REG_VT_DWORD), $(Type) }, +
460: {Start, 0, $(!REG_VT_DWORD), $(!SERVICE_SYSTEM_START) }, +
461: {Group, 0, $(!REG_VT_SZ), $(Group) }, +
462: {ErrorControl, 0, $(!REG_VT_DWORD), $(ErrorControl) }, +
463: {Tag, 0, $(!REG_VT_DWORD), $(Tag) }, +
464: {BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary) } +
465: }
466: set ParametersValues = ""
467: set DeviceValues = {}
468: set EventLogValues = { +
469: {EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, +
470: {TypesSupported, 0, $(!REG_VT_DWORD), $(TypesSupported) } +
471: }
472:
473:
474: shell "registry.inf" MakeServicesEntry $(ServiceNode) +
475: $(ServicesValues) +
476: $(ParametersValues) +
477: $(DeviceValues) +
478: $(EventLogValues) +
479: Parameters
480:
481:
482: ifint $($ShellCode) != $(!SHELL_CODE_OK)
483: Debug-Output "POINTER.INF: Couldn't execute MakeServicesEntry in registry.inf"
484: goto errorconfig
485: endif
486:
487: ifstr(i) $($R0) != STATUS_SUCCESSFUL
488: Debug-Output "POINTER.INF: MakeServicesEntry failed for pointer"
489: goto errorconfig
490: endif
491:
492: endif
493:
494: ;
495: ;
496: ; then disable the previous pointer port entry
497: ;
498:
499: ifstr(i) $(CurrentPortEntry) != $(PortDriver)
500: ifstr(i) $(CurrentPortEntry) != ""
501: ifstr(i) $(CurrentPortEntry) != i8042prt
502: shell "registry.inf" ModifyServicesEntry $(CurrentPortEntry) $(!SERVICE_DISABLED)
503:
504: ifint $($ShellCode) != $(!SHELL_CODE_OK)
505: Debug-Output "POINTER.INF: Couldn't find DisableServicesEntry in registry.inf"
506: goto errorconfig
507: endif
508:
509: ifstr(i) $($R0) != STATUS_SUCCESSFUL
510: Debug-Output "POINTER.INF: DisableServices entry failed"
511: goto errorconfig
512: endif
513: endif
514: endif
515: endif
516:
517: ;
518: ; and the previous pointer class entry
519: ;
520:
521: ifstr(i) $(CurrentClassEntry) != $(ClassDriver)
522: ifstr(i) $(CurrentClassEntry) != ""
523: shell "registry.inf" ModifyServicesEntry $(CurrentClassEntry) $(!SERVICE_DISABLED)
524:
525: ifint $($ShellCode) != $(!SHELL_CODE_OK)
526: Debug-Output "POINTER.INF: Couldn't find DisableServicesEntry in registry.inf"
527: goto errorconfig
528: endif
529:
530: ifstr(i) $($R0) != STATUS_SUCCESSFUL
531: Debug-Output "POINTER.INF: DisableServices entry failed"
532: goto errorconfig
533: endif
534: endif
535: endif
536:
537: goto configdone
538:
539: errorconfig = +
540: ifstr(i) $(CurrentPortEntry) != $(PortDriver)
541: ifstr(i) $(PortDriver) != ""
542: shell "registry.inf" ModifyServicesEntry $(PortDriver) $(!SERVICE_DISABLED)
543: endif
544: ifstr(i) $(CurrentPortEntry) != ""
545: shell "registry.inf" ModifyServicesEntry $(CurrentPortEntry) $(!SERVICE_SYSTEM_START)
546: endif
547: endif
548: ifstr(i) $(CurrentClassEntry) != $(ClassDriver)
549: ifstr(i) $(ClassDriver) != ""
550: shell "registry.inf" ModifyServicesEntry $(ClassDriver) $(!SERVICE_DISABLED)
551: endif
552: ifstr(i) $(CurrentClassEntry) != ""
553: shell "registry.inf" ModifyServicesEntry $(CurrentClassEntry) $(!SERVICE_SYSTEM_START)
554: endif
555: endif
556: goto finish_InstallOption
557:
558: configdone = +
559: endif
560:
561: set Status = STATUS_SUCCESSFUL
562: finish_InstallOption = +
563: ForListDo $(DrivesToFree)
564: LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
565: EndForListDo
566:
567: Return $(Status)
568:
569:
570: [Install-AddCopyOption]
571:
572: set STF_VITAL = ""
573:
574: ;
575: ; Add the files to the copy list
576: ;
577:
578: AddSectionKeyFileToCopyList Files-MousePortDrivers +
579: $(PortDriver) +
580: $(SrcDir) +
581: $(!STF_WINDOWSSYSPATH)\drivers
582:
583: AddSectionKeyFileToCopyList Files-MouseClassDrivers +
584: $(ClassDriver) +
585: $(SrcDir) +
586: $(!STF_WINDOWSSYSPATH)\drivers
587:
588: exit
589:
590:
591: [Install-DoCopyOption]
592:
593: ;
594: ; Copy files in the copy list
595: ;
596: CopyFilesInCopyList
597: exit
598:
599: ;**************************************************************************
600: ; PROGRESS GUAGE VARIABLES
601: ;**************************************************************************
602:
603: [ProgressCopyENG]
604: ProCaption = "Windows NT Setup"
605: ProCancel = "Cancel"
606: ProCancelMsg = "Windows NT is not correcly installed. Are you sure you want "+
607: "to cancel copying files?"
608: ProCancelCap = "Setup Message"
609: ProText1 = "Copying:"
610: ProText2 = "To:"
611:
612: [StringsENG]
613: String1 = "Mouse"
614: String2 = "Please enter the full path to the OEM Mouse "+
615: "driver files. Then choose Continue."
616:
617:
618:
619: ;-----------------------------------------------------------------------
620: ; SOURCE MEDIA DESCRIPTIONS
621: ; -------------------------
622: ; The OEM should list all the diskette labels here. The source media
623: ; description is used during copy to prompt the user for a diskette
624: ; if the source is diskettes.
625: ;
626: ; Use 1 = "Diskette 1 Label" , TAGFILE = disk1
627: ; 2 = "Diskette 2 Label" , TAGFILE = disk2
628: ; ...
629: ;-----------------------------------------------------------------------
630:
631: ;--------------------------------------------------------------------
632: ; THE SECTIONS BELOW SHOULD BE AUTOMATICALLY GENERATED BY THE EXCEL
633: ; SPREAD SHEETS
634: ;--------------------------------------------------------------------
635: [Source Media Descriptions]
636: 1 = "OEM DISK (POINTER)" , TAGFILE = disk1
637:
638: [Files-MouseClassDrivers]
639: oemmoucs = 1,oemmoucs.sys , SIZE=999
640:
641: [Files-MousePortDrivers]
642: oemmouse = 1,oemmouse.sys , SIZE=999
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.