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