|
|
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, TAPE, PRINTER, ...
8: ;-----------------------------------------------------------------------
9:
10: [Identification]
11: OptionType = SCSI
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: ;-----------------------------------------------------------------------
28: ; OPTION LIST
29: ; -----------
30: ; This section lists the Option key names. These keys are locale
31: ; independent and used to represent the option in a locale independent
32: ; manner.
33: ;
34: ;-----------------------------------------------------------------------
35:
36: [Options]
37: "OEMSCSI" = oemscsi
38:
39: ;-----------------------------------------------------------------------
40: ; OPTION TEXT SECTION
41: ; -------------------
42: ; These are text strings used to identify the option to the user. There
43: ; are separate sections for each language supported. The format of the
44: ; section name is "OptionsText" concatenated with the Language represented
45: ; by the section.
46: ;
47: ;-----------------------------------------------------------------------
48:
49: [OptionsTextENG]
50: "OEMSCSI" = "OEM SCSI for Adaptec 154x/164x"
51:
52:
53: ;-----------------------------------------------------------------------------------------
54: ; SCSI MINIPORT DRIVERS:
55: ;
56: ; Order of the information:
57: ;
58: ; Class driver = Type, Group, ErrorControl, Tag, EventMessageFile, TypesSupported
59: ;
60: ;-----------------------------------------------------------------------------------------
61:
62: [MiniportDrivers]
63: oemscsi = !SERVICE_KERNEL_DRIVER, "SCSI Miniport", !SERVICE_ERROR_NORMAL, 17, %SystemRoot%\System32\IoLogMsg.dll , 7
64:
65: ;---------------------------------------------------------------------------
66: ; 1. Identify
67: ;
68: ; DESCRIPTION: To verify that this INF deals with the same type of options
69: ; as we are choosing currently.
70: ;
71: ; INPUT: None
72: ;
73: ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
74: ; $($R1): Option Type (COMPUTER ...)
75: ; $($R2): Diskette description
76: ;---------------------------------------------------------------------------
77:
78: [Identify]
79: ;
80: ;
81: read-syms Identification
82:
83: set Status = STATUS_SUCCESSFUL
84: set Identifier = $(OptionType)
85: set Media = #("Source Media Descriptions", 1, 1)
86:
87: Return $(Status) $(Identifier) $(Media)
88:
89:
90:
91: ;------------------------------------------------------------------------
92: ; 2. ReturnOptions:
93: ;
94: ; DESCRIPTION: To return the option list supported by this INF and the
95: ; localised text list representing the options.
96: ;
97: ;
98: ; INPUT: $($0): Language used. ( ENG | FRN | ... )
99: ;
100: ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
101: ; STATUS_NOLANGUAGE
102: ; STATUS_FAILED
103: ;
104: ; $($R1): Option List
105: ; $($R2): Option Text List
106: ;------------------------------------------------------------------------
107:
108: [ReturnOptions]
109: ;
110: ;
111: set Status = STATUS_FAILED
112: set OptionList = {}
113: set OptionTextList = {}
114:
115: ;
116: ; Check if the language requested is supported
117: ;
118: set LanguageList = ^(LanguagesSupported, 1)
119: Ifcontains(i) $($0) in $(LanguageList)
120: goto returnoptions
121: else
122: set Status = STATUS_NOLANGUAGE
123: goto finish_ReturnOptions
124: endif
125:
126: ;
127: ; form a list of all the options and another of the text representing
128: ;
129:
130: returnoptions = +
131: set OptionList = ^(Options, 0)
132: set OptionTextList = ^(OptionsText$($0), 1)
133: set Status = STATUS_SUCCESSFUL
134:
135: finish_ReturnOptions = +
136: Return $(Status) $(OptionList) $(OptionTextList)
137:
138:
139: ;
140: ; 3. InstallOption:
141: ;
142: ; FUNCTION: To copy files representing Options
143: ; To configure the installed option
144: ; To update the registry for the installed option
145: ;
146: ; INPUT: $($0): Language to use
147: ; $($1): OptionID to install
148: ; $($2): SourceDirectory
149: ; $($3): AddCopy (YES | NO)
150: ; $($4): DoCopy (YES | NO)
151: ; $($5): DoConfig (YES | NO)
152: ;
153: ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
154: ; STATUS_NOLANGUAGE |
155: ; STATUS_USERCANCEL |
156: ; STATUS_FAILED
157: ;
158:
159: [InstallOption]
160:
161: ;
162: ; Set default values for
163: ;
164: set Status = STATUS_FAILED
165: set DrivesToFree = {}
166:
167: ;
168: ; extract parameters
169: ;
170: set Option = $($1)
171: set SrcDir = $($2)
172: set AddCopy = $($3)
173: set DoCopy = $($4)
174: set DoConfig = $($5)
175:
176: ;
177: ; Check if the language requested is supported
178: ;
179: set LanguageList = ^(LanguagesSupported, 1)
180: Ifcontains(i) $($0) in $(LanguageList)
181: else
182: set Status = STATUS_NOLANGUAGE
183: goto finish_InstallOption
184: endif
185: read-syms Strings$($0)
186:
187: ;
188: ; check to see if Option is supported.
189: ;
190:
191: set OptionList = ^(Options, 0)
192: ifcontains $(Option) in $(OptionList)
193: else
194: Debug-Output "SCSI.INF: SCSI option is not supported."
195: goto finish_InstallOption
196: endif
197: set OptionList = ""
198:
199: ;
200: ; Option has been defined already
201: ;
202:
203: set MiniportDriver = #(Options, $(Option), 1)
204: set Type = $(#(MiniportDrivers, $(MiniportDriver), 1))
205: set Group = #(MiniportDrivers, $(MiniportDriver), 2)
206: set ErrorControl = $(#(MiniportDrivers, $(MiniportDriver), 3))
207: set Tag = #(MiniportDrivers, $(MiniportDriver), 4)
208: set EventMessageFile = #(MiniportDrivers, $(MiniportDriver), 5)
209: set TypesSupported = #(MiniportDrivers, $(MiniportDriver), 6)
210:
211: set Start = $(!SERVICE_BOOT_START)
212:
213: installtheoption = +
214:
215: ;
216: ; Code to add files to copy list
217: ;
218:
219: ifstr(i) $(AddCopy) == "YES"
220: set DoActualCopy = NO
221: set FileToCheck = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
222: LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
223: ifstr(i) $(STATUS) == NO
224: set DoActualCopy = YES
225: endif
226:
227: ifstr(i) $(DoActualCopy) == NO
228: shell "subroutn.inf" DriversExist $($0) $(String1)
229: ifint $($ShellCode) != $(!SHELL_CODE_OK)
230: Debug-Output "SCSI.INF: shelling DriversExist failed"
231: goto finish_InstallOption
232: endif
233:
234: ifstr(i) $($R0) == STATUS_CURRENT
235: else-ifstr(i) $($R0) == STATUS_NEW
236: set DoActualCopy = YES
237: else-ifstr(i) $($R0) == STATUS_USERCANCEL
238: Debug-Output "SCSI.INF: User cancelled SCSI installation"
239: goto finish_InstallOption
240: else
241: Debug-Output "SCSI.INF: Error reported in DriversExist routine in SUBROUTN.INF"
242: goto finish_InstallOption
243: endif
244: endif
245:
246: ifstr(i) $(DoActualCopy) == YES
247:
248: shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2)
249: ifint $($ShellCode) != $(!SHELL_CODE_OK)
250: Debug-Output "SCSI.INF: shelling DoAskSourceEx failed"
251: goto finish_InstallOption
252: endif
253:
254: ifstr(i) $($R0) == STATUS_SUCCESSFUL
255: set SrcDir = $($R1)
256: ifstr(i) $($R2) != ""
257: set DrivesToFree = >($(DrivesToFree), $($R2))
258: endif
259: else
260: Debug-Output "SCSI.INF: User cancelled asking source."
261: goto finish_InstallOption
262: endif
263:
264: install Install-AddCopyOption
265: ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
266: Debug-Output "Adding SCSI files to copy list failed"
267: goto finish_InstallOption
268: endif
269: else
270: set DoCopy = NO
271: endif
272:
273: endif
274:
275: ifstr(i) $(DoCopy) == "YES"
276: read-syms ProgressCopy$($0)
277: install Install-DoCopyOption
278: ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
279: Debug-Output "Copying files failed"
280: goto finish_InstallOption
281: else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
282: set Status = STATUS_USERCANCEL
283: goto finish_InstallOption
284: endif
285: endif
286:
287: ifstr(i) $(DoConfig) == "YES"
288: ;
289: ; first run a privilege check on modifying the setup node
290: ;
291:
292: shell "registry.inf" CheckSetupModify
293: ifint $($ShellCode) != $(!SHELL_CODE_OK)
294: goto finish_InstallOption
295: endif
296:
297: ifstr(i) $($R0) != STATUS_SUCCESSFUL
298: goto finish_InstallOption
299: endif
300:
301: ;
302: ; then make a new SCSI entry, the entry is created automatically
303: ; enabled
304: ;
305:
306: set ServiceNode = $(MiniportDriver)
307: set ServiceBinary = System32\drivers\#(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
308:
309: set ServicesValues = { +
310: {Type, 0, $(!REG_VT_DWORD), $(Type) }, +
311: {Start, 0, $(!REG_VT_DWORD), $(Start) }, +
312: {Group, 0, $(!REG_VT_SZ), $(Group) }, +
313: {ErrorControl, 0, $(!REG_VT_DWORD), $(ErrorControl) }, +
314: {Tag, 0, $(!REG_VT_DWORD), $(Tag) }, +
315: {BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary) } +
316: }
317: set ParametersValues = ""
318: set DeviceValues = {}
319: set EventLogValues = { +
320: {EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, +
321: {TypesSupported, 0, $(!REG_VT_DWORD), $(TypesSupported) } +
322: }
323:
324: shell "registry.inf" MakeServicesEntry $(ServiceNode) +
325: $(ServicesValues) +
326: $(ParametersValues) +
327: $(DeviceValues) +
328: $(EventLogValues) +
329: Parameters
330:
331:
332:
333: ifint $($ShellCode) != $(!SHELL_CODE_OK)
334: Debug-Output "Couldn't execute MakeServicesEntry in registry.inf"
335: goto finish_InstallOption
336: endif
337:
338: ifstr(i) $($R0) != STATUS_SUCCESSFUL
339: Debug-Output "MakeServicesEntry failed for SCSI"
340: goto finish_InstallOption
341: endif
342:
343: endif
344:
345: set Status = STATUS_SUCCESSFUL
346: finish_InstallOption = +
347: ForListDo $(DrivesToFree)
348: LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
349: EndForListDo
350:
351: Return $(Status)
352:
353:
354: [Install-AddCopyOption]
355:
356: ;
357: ; Add the files to the copy list
358: ;
359: AddSectionKeyFileToCopyList Files-ScsiMiniportDrivers +
360: $(MiniportDriver) +
361: $(SrcDir) +
362: $(!STF_WINDOWSSYSPATH)\drivers
363:
364: exit
365:
366:
367: [Install-DoCopyOption]
368:
369: ;
370: ; Copy files in the copy list
371: ;
372: CopyFilesInCopyList
373: exit
374:
375: ;-------------------------------------------------------------------------
376: ; 4. DeInstallOption:
377: ;
378: ; FUNCTION: To remove files representing Option
379: ; To remove the registry entry corresponding to the Option
380: ;
381: ; INPUT: $($0): Language to use
382: ; $($1): OptionID to install
383: ;
384: ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
385: ; STATUS_NOLANGUAGE |
386: ; STATUS_USERCANCEL |
387: ; STATUS_FAILED
388: ;-------------------------------------------------------------------------
389: [DeInstallOption]
390: ;
391: ; Set default values for
392: ;
393: set Status = STATUS_FAILED
394: ;
395: ; extract parameters
396: ;
397: set Option = $($1)
398:
399: ;
400: ; Check if the language requested is supported
401: ;
402: set LanguageList = ^(LanguagesSupported, 1)
403: Ifcontains(i) $($0) in $(LanguageList)
404: else
405: set Status = STATUS_NOLANGUAGE
406: goto finish_DeInstallOption
407: endif
408: read-syms Strings$($0)
409:
410: ;
411: ; check to see if Option is supported.
412: ;
413:
414: set OptionList = ^(Options, 0)
415: ifcontains $(Option) in $(OptionList)
416: else
417: goto finish_DeInstallOption
418: endif
419: set OptionList = ""
420:
421: ;
422: ; fetch details about option
423: ;
424:
425: set MiniportDriver = #(Options, $(Option), 1)
426: set MiniportFile = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
427: set FilePath = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
428:
429: ;
430: ; check to see if file is installed
431: ; if not give success
432: ;
433:
434: LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
435: ifstr(i) $(STATUS) == "NO"
436: set Status = STATUS_SUCCESSFUL
437: goto finish_DeInstallOption
438: endif
439:
440: shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
441: ifstr(i) $($R0) != "STATUS_SUCCESSFUL"
442: ; this could happen if there is no start value or there is no
443: ; key, in which case the option is not installed
444: set Status = STATUS_SUCCESSFUL
445: goto finish_DeInstallOption
446: endif
447:
448: ifstr(i) $($R1) == $(!SERVICE_BOOT_START)
449: shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "WARNING" $(String3)
450: ifstr(i) $($R0) != STATUS_SUCCESSFUL
451: goto do_removal
452: endif
453: ifstr(i) $($R1) == "CANCEL"
454: goto finish_DeInstallOption
455: endif
456: endif
457:
458: do_removal =+
459: ;
460: ; disable the registry entry
461: ;
462:
463: shell "registry.inf" RemoveServicesEntry $(MiniportDriver)
464: ifint $($ShellCode) != $(!SHELL_CODE_OK)
465: Debug-Output "SCSI.INF: Failed to shell RemoveServicesEntry"
466: goto finish_DeInstallOption
467: endif
468:
469: ifstr(i) $($R0) != STATUS_SUCCESSFUL
470: Debug-Output "SCSI.INF: Failed to disable services entry"
471: goto finish_DeInstallOption
472: endif
473:
474: ;
475: ; we won't remove the file because we can only do so during the next boot.
476: ; if the user chooses to reinstall the same driver during this boot
477: ; he will still end up deleting the driver on next boot. if the file
478: ; should be deleted a warning should be put up saying that the user should
479: ; not try to reinstall the driver during this boot
480: ;
481: ; AddFileToDeleteList $(FilePath)
482:
483: set Status = STATUS_SUCCESSFUL
484:
485: finish_DeInstallOption =+
486: return $(Status)
487:
488:
489: ;-------------------------------------------------------------------------
490: ; 5. GetInstalledOptions:
491: ;
492: ; FUNCTION: To find out the list of options which are installed
493: ;
494: ; INPUT: $($0): Language to Use
495: ;
496: ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
497: ; STATUS_FAILED
498: ;
499: ; $($R1): List of options installed
500: ; $($R2): Option installed Text List
501: ;-------------------------------------------------------------------------
502: [GetInstalledOptions]
503: set Status = STATUS_FAILED
504: set InstalledOptions = {}
505: set InstalledOptionsText = {}
506:
507: ;
508: ; Check if the language requested is supported
509: ;
510: set LanguageList = ^(LanguagesSupported, 1)
511: Ifcontains(i) $($0) in $(LanguageList)
512: else
513: set Status = STATUS_NOLANGUAGE
514: goto finish_GetInstalledOptions
515: endif
516:
517: set OptionList = ^(Options, 0)
518: ForListDo $(OptionList)
519: set MiniportDriver = #(Options, $($), 1)
520: set MiniportFile = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
521: set FilePath = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
522: LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
523: ifstr(i) $(STATUS) == "YES"
524: shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
525: ifint $($ShellCode) == $(!SHELL_CODE_OK)
526: ifstr(i) $($R0) == STATUS_SUCCESSFUL
527: ifstr(i) $($R1) != $(!SERVICE_DISABLED)
528:
529: set OptionText = #(OptionsText$($0), $($), 1)
530: set InstalledOptions = >($(InstalledOptions), $($))
531: set InstalledOptionsText = >($(InstalledOptionsText), $(OptionText))
532:
533: endif
534: endif
535: endif
536: endif
537: EndForListDo
538: set Status = STATUS_SUCCESSFUL
539: finish_GetInstalledOptions =+
540: Return $(Status) $(InstalledOptions) $(InstalledOptionsText)
541:
542:
543: ;**************************************************************************
544: ; PROGRESS GUAGE VARIABLES
545: ;**************************************************************************
546:
547: [ProgressCopyENG]
548: ProCaption = "Windows NT Setup"
549: ProCancel = "Cancel"
550: ProCancelMsg = "Windows NT is not correcly installed. Are you sure you want "+
551: "to cancel copying files?"
552: ProCancelCap = "Setup Message"
553: ProText1 = "Copying:"
554: ProText2 = "To:"
555:
556: [StringsENG]
557: String1 = "SCSI Adapter"
558: String2 = "Please enter the full path to the OEM SCSI "+
559: "Adapter files. Then choose Continue."
560: String3 = "The SCSI Adapter has been marked as a boot device. Removing "+
561: "it may cause the system not to boot."$(!LF)$(!LF)"Are you sure "+
562: "you want to remove the Adapter."
563:
564: [Source Media Descriptions]
565: 1 = "OEM DISK (SCSI)" , TAGFILE = disk1
566:
567: [Files-ScsiMiniportDrivers]
568: oemscsi = 1,oemscsi.sys , SIZE=999
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.