|
|
1.1 ! root 1: ;-------------------------------------- ! 2: ; HARDWARE OPTION CLASSES WE UNDERSTAND ! 3: ;-------------------------------------- ! 4: ! 5: [Options] ! 6: ; ! 7: Computer = cpt ! 8: Video = vio ! 9: Pointer = ptr ! 10: Keyboard = kbd ! 11: Layout = lay ! 12: Language = lng ! 13: Printer = prn ! 14: Scsi = scs ! 15: Tape = tap ! 16: Sound = snd ! 17: Driver = drv ! 18: NetAdapter = nad ! 19: NetDriver = ndr ! 20: NetTransport = nxp ! 21: NetService = nsv ! 22: Network = nwk ! 23: NetProvider = npr ! 24: ! 25: ! 26: [OemOptionFiles] ! 27: OemFiles = {} ? $(!LIBHANDLE) FindFileInstances $(!STF_WINDOWSSYSPATH)"\oem"$(Abb)"*.inf" ! 28: ! 29: ;----------------------------------------------------------------------- ! 30: ; ! 31: ; ROUTINE: ReturnOemOptions ! 32: ; ! 33: ; DESCRIPTION: This routine finds out if an OEM file representing ! 34: ; the option exists in the windows sytem directory ! 35: ; and returns the options represented in the INF. ! 36: ; ! 37: ; INPUTS: $0: Language to use ! 38: ; $1: Option Type (Computer|Video|...) ! 39: ; ! 40: ; OUTPUTS: $R0: STATUS: STATUS_SUCCESSFUL | ! 41: ; STATUS_FAILED ! 42: ; ! 43: ; $R1: OemOptionList: This is of form: ! 44: ; { {Oemfile1, Option1List, Option1TextList}, ! 45: ; {Oemfile2, Option2List, Option2TextList}, ! 46: ; ... ! 47: ; } ! 48: ; ! 49: ; ! 50: ;------------------------------------------------------------------------ ! 51: ! 52: [ReturnOemOptions] ! 53: ; ! 54: ; Initialize ! 55: ; ! 56: set Status = STATUS_FAILED ! 57: set OemOptionList = {} ! 58: ! 59: set Abb = #(Options, $($1), 1) ! 60: read-syms OemOptionFiles ! 61: detect OemOptionFiles ! 62: ! 63: ForListDo $(OemFiles) ! 64: set OemFileName = $(!STF_WINDOWSSYSPATH)"\"$($) ! 65: set Found = FALSE ! 66: shell "", GetOptionsFromINF $($0) $($1) $(OemFileName) ! 67: ifstr(i) $($R0) == STATUS_SUCCESSFUL ! 68: ForListDo $(OemOptionList) ! 69: ifstr(i) *($($), 2) == $($R1) ! 70: set Found = TRUE ! 71: endif ! 72: EndForListDo ! 73: ifstr(i) $(Found) == FALSE ! 74: set OemOptionList = >($(OemOptionList), {$($), $($R1), $($R2)}) ! 75: endif ! 76: endif ! 77: EndForListDo ! 78: set Status = STATUS_SUCCESSFUL ! 79: ! 80: finish_GetCurrentOemOptions = + ! 81: Return $(Status) $(OemOptionList) ! 82: ! 83: ! 84: ! 85: ;----------------------------------------------------------------------- ! 86: ; ! 87: ; ROUTINE: GetOptionsFromINF ! 88: ; ! 89: ; DESCRIPTION: This routine checks to see if the specified file exists ! 90: ; and if it is of the right type and gets option info from ! 91: ; the INF. ! 92: ; ! 93: ; INPUTS: $0: Language To use ! 94: ; $1: OptionType ! 95: ; $2: OptionFileName ! 96: ; ! 97: ; OUTPUTS: $R0: STATUS: STATUS_SUCCESSFUL | ! 98: ; STATUS_INFNOTFOUND | ! 99: ; STATUS_FAILED ! 100: ; ! 101: ; $R1: OptionList ! 102: ; $R2: OPtionTextList ! 103: ; ! 104: ;------------------------------------------------------------------------ ! 105: ! 106: [GetOptionsFromINF] ! 107: ! 108: ; ! 109: ; Initialize ! 110: ; ! 111: ! 112: set Status = STATUS_FAILED ! 113: set OptionList = {} ! 114: set OptionTextList = {} ! 115: ! 116: ! 117: set FileToCheck = $($2) ! 118: install Install-SeeIfFileIsPresent ! 119: ifstr(i) $(STATUS) != "YES" ! 120: set Status = STATUS_INFNOTFOUND ! 121: goto finish_GetOptionsFromINF ! 122: endif ! 123: ! 124: ; ! 125: ; Check that the INF represents the option we are looking for ! 126: ; ! 127: shell $($2) Identify ! 128: ifstr(i) $($R0) == "STATUS_SUCCESSFUL" ! 129: ifstr(i) $($R1) == $($1) ! 130: shell $($2) ReturnOptions $($0) $(!STF_BUSTYPE) ! 131: ifstr(i) $($R0) == STATUS_SUCCESSFUL ! 132: set OptionList = $($R1) ! 133: set OptionTextList = $($R2) ! 134: set Status = STATUS_SUCCESSFUL ! 135: goto finish_GetOptionsFromINF ! 136: endif ! 137: endif ! 138: endif ! 139: ! 140: finish_GetOptionsFromINF = + ! 141: Return $(Status) $(OptionList) $(OptionTextList) ! 142: ! 143: ! 144: ;----------------------------------------------------------------------- ! 145: ; ! 146: ; ROUTINE: GetNewOEMOption ! 147: ; ! 148: ; DESCRIPTION: This routine prompts the user for a new OEM file, presents ! 149: ; the options supported and if the user chooses one of these ! 150: ; copies over the INF to the windows system directory. ! 151: ; ! 152: ; INPUTS: $0: Language to use ! 153: ; $1: OemOptionList ! 154: ; $2: OptionType ! 155: ; $3: OptDisketteSource ! 156: ; ! 157: ; OUTPUTS: $R0: STATUS: STATUS_SUCCESSFUL | ! 158: ; STATUS_USERCANCEL | ! 159: ; STATUS_FAILED | ! 160: ; ! 161: ; $R1: NewOemOptionList ! 162: ; $R2: OemOptionChosen ! 163: ; $R3: OemOptionChosenText ! 164: ; $R4: OEMINFSource ! 165: ; ! 166: ;------------------------------------------------------------------------ ! 167: ! 168: [GetNewOEMOption] ! 169: ; ! 170: set Status = STATUS_FAILED ! 171: ! 172: set Option = $($2) ! 173: set OptDisketteSrc = $($3) ! 174: set OptDiskette = #(OptionDiskettes$($0), $($2), 1) ! 175: set InfName1 = "OEMSETUP.INF" ! 176: set InfName2 = "OEMSETNT.INF" ! 177: ! 178: set Abb = #(Options, $(Option), 1) ! 179: ! 180: set NewOemOptionList = $($1) ! 181: set OptionChosen = "" ! 182: set OptionChosenText = "" ! 183: ! 184: ; ! 185: ; Prompt the user for the diskette containing the INF ! 186: ; ! 187: ! 188: ask_dodiskette = + ! 189: ; ! 190: ; Reset the INF name to the standard default ! 191: ; ! 192: set InfName = $(InfName1) ! 193: ! 194: shell "" DoDiskette $($0) $(OptDiskette) $(OptDisketteSrc) ! 195: set Status = STATUS_FAILED ! 196: ! 197: ifstr(i) $($R0) == STATUS_USERCANCEL ! 198: set Status = STATUS_USERCANCEL ! 199: goto finish_GetOEMOption ! 200: else-ifstr(i) $($R0) == STATUS_FAILED ! 201: goto finish_GetOEMOption ! 202: endif ! 203: ! 204: set OptDisketteSrc = $($R1) ! 205: ! 206: ; ! 207: ; Check that the Diskette contains an INF we are looking for ! 208: ; ! 209: ask_inf_retry = + ! 210: FlushInf $(InfName) ! 211: LibraryProcedure FileToCheck, $(!LIBHANDLE), AppendBackSlash $(OptDisketteSrc) ! 212: set FileToCheck = $(FileToCheck)$(InfName) ! 213: install Install-SeeIfFileIsPresent ! 214: set OemSetupFilePath = $(FileToCheck) ! 215: set NfError = 1 ! 216: ! 217: ifstr(i) $(STATUS) == YES ! 218: set NfError = 2 ! 219: ; ! 220: ; Check that the INF represents the option we are looking for ! 221: ; ! 222: shell $(OemSetupFilePath) Identify ! 223: ifstr(i) $($R0) == "STATUS_SUCCESSFUL" ! 224: ifstr(i) $($R1) == $(Option) ! 225: shell $(OemSetupFilePath) ReturnOptions $($0) $(!STF_BUSTYPE) ! 226: ifstr(i) $($R0) == STATUS_SUCCESSFUL ! 227: set OemList = $($R1) ! 228: set OemTextList = $($R2) ! 229: goto asksingleselection ! 230: endif ! 231: endif ! 232: endif ! 233: endif ! 234: ; ! 235: ; The file isn't in NT format; try the alternate name. ! 236: ; ! 237: ifstr(i) $(InfName) == $(InfName1) ! 238: Set InfName = $(InfName2) ! 239: goto ask_inf_retry ! 240: endif ! 241: ! 242: read-syms NonFatalError$(NfError)$($0) ! 243: shell "subroutn.inf" SetupMessage $($0) "NONFATAL" $(NonFatal) ! 244: goto ask_dodiskette ! 245: ! 246: ; ! 247: ; Present the OEM options to the user. Let the user select. If ! 248: ; the user selects to cancel, don't change anything, just return ! 249: ; ! 250: ! 251: asksingleselection = + ! 252: shell "" DoSingleOption $(OemList) $(OemTextList) $(OptDiskette) ! 253: ifstr(i) $($R0) == STATUS_FAILED ! 254: set Status = STATUS_FAILED ! 255: goto finish_GetOEMOption ! 256: else-ifstr(i) $($R0) == STATUS_USERCANCEL ! 257: set Status = STATUS_USERCANCEL ! 258: goto finish_GetOEMOption ! 259: endif ! 260: ! 261: set OptionChosen = $($R1) ! 262: set OptionChosenText = $($R2) ! 263: ! 264: ; ! 265: ; Determine the file name to use to copy over. First see if the INF ! 266: ; is a duplicate ! 267: ; ! 268: ! 269: set Duplicate = FALSE ! 270: ForListDo $($1) ! 271: ifstr(i) *($($), 2) == $(OemList) ! 272: set OemFileName = *($($), 1) ! 273: set Duplicate = TRUE ! 274: FlushInf $(OemFileName) ! 275: goto copyinf ! 276: endif ! 277: EndForListDo ! 278: ! 279: ; ! 280: ; Not a duplicate, we need to copy it under a unique name. ! 281: ; ! 282: ! 283: set Num = 0 ! 284: nextinf = + ! 285: ifint $(Num) < 99 ! 286: set OemFileName = "oem"$(Abb)$(Num)".inf" ! 287: set FileToCheck = $(!STF_WINDOWSSYSPATH)"\"$(OemFileName) ! 288: install Install-SeeIfFileIsPresent ! 289: ifstr(i) $(STATUS) == "YES" ! 290: set-add Num = $(Num) 1 ! 291: goto nextinf ! 292: else ! 293: goto copyinf ! 294: endif ! 295: endif ! 296: goto finish_GetOEMOption ! 297: ! 298: copyinf = + ! 299: ; ! 300: ; copy the INF over to the windows system directory ! 301: ; ! 302: set OemSrc = $(OemSetupFilePath) ! 303: set OemDst = $(!STF_WINDOWSSYSPATH)"\"$(OemFileName) ! 304: install Install-OemINF ! 305: ! 306: ! 307: ; ! 308: ; form the new oem option list ! 309: ; ! 310: ifstr(i) $(Duplicate) == TRUE ! 311: else ! 312: set NewOemOptionList = >($(NewOemOptionList), {$(OemFileName), $(OemList), $(OemTextList)}) ! 313: endif ! 314: set Status = STATUS_SUCCESSFUL ! 315: ! 316: finish_GetOEMOption = + ! 317: FlushInf $(InfName) ! 318: Return $(Status) $(NewOemOptionList) $(OptionChosen) $(OptionChosenText) $(OptDisketteSrc) ! 319: ! 320: ;----------------------------------------------------------------------- ! 321: ; ! 322: ; ROUTINE: GetNewOEMMultiOption ! 323: ; ! 324: ; DESCRIPTION: This routine prompts the user for a new OEM file, presents ! 325: ; the options supported and if the user chooses one of these ! 326: ; copies over the INF to the windows system directory. ! 327: ; ! 328: ; INPUTS: $0: Language to use ! 329: ; $1: OemOptionList ! 330: ; $2: OptionTypeList; e.g., { NetService, NetTransport } ! 331: ; $3: OptDisketteSource ! 332: ; ! 333: ; OUTPUTS: $R0: STATUS: STATUS_SUCCESSFUL | ! 334: ; STATUS_USERCANCEL | ! 335: ; STATUS_FAILED | ! 336: ; ! 337: ; $R1: NewOemOptionList ! 338: ; $R2: OemOptionChosen ! 339: ; $R3: OemOptionChosenText ! 340: ; $R4: OEMINFSource ! 341: ; ! 342: ;------------------------------------------------------------------------ ! 343: ! 344: [GetNewOEMMultiOption] ! 345: ! 346: Debug-Output $(STF_CONTEXTINFNAME)": GetNewOEMMultiOption called" ! 347: ! 348: set Status = STATUS_FAILED ! 349: ! 350: set OptionType = "" ! 351: set OptionTypeList = $($2) ! 352: set OptDisketteSrc = $($3) ! 353: set InfName1 = "OEMSETUP.INF" ! 354: set InfName2 = "OEMSETNT.INF" ! 355: ! 356: read-syms OptionDisketteMulti$($0) ! 357: ! 358: Set TypeNames = ^(Options,0) ! 359: Set TypeAbbs = ^(Options,1) ! 360: ! 361: set NewOemOptionList = $($1) ! 362: set OptionChosen = "" ! 363: set OptionChosenText = "" ! 364: ! 365: ; ! 366: ; Prompt the user for the diskette containing the INF ! 367: ; ! 368: ! 369: m_ask_dodiskette = + ! 370: Debug-Output $(STF_CONTEXTINFNAME)": GetNewOEMMultiOption shelling DoDiskette" ! 371: ! 372: ; ! 373: ; Reset the INF name to the standard default ! 374: ; ! 375: set InfName = $(InfName1) ! 376: ! 377: shell "" DoDiskette $($0) $(OptDiskette) $(OptDisketteSrc) ! 378: set Status = STATUS_FAILED ! 379: ! 380: ifstr(i) $($R0) == STATUS_USERCANCEL ! 381: set Status = STATUS_USERCANCEL ! 382: goto m_finish_GetOEMOption ! 383: else-ifstr(i) $($R0) == STATUS_FAILED ! 384: goto m_finish_GetOEMOption ! 385: endif ! 386: ! 387: set OptDisketteSrc = $($R1) ! 388: ! 389: ; ! 390: ; Check that the Diskette contains an INF we are looking for ! 391: ; ! 392: ! 393: m_ask_inf_retry = + ! 394: FlushInf $(InfName) ! 395: LibraryProcedure FileToCheck, $(!LIBHANDLE), AppendBackSlash $(OptDisketteSrc) ! 396: set FileToCheck = $(FileToCheck)$(InfName) ! 397: install Install-SeeIfFileIsPresent ! 398: set OemSetupFilePath = $(FileToCheck) ! 399: set NfError = 1 ! 400: ! 401: ifstr(i) $(STATUS) == YES ! 402: set NfError = 2 ! 403: ; ! 404: ; Check that the INF represents the option we are looking for ! 405: ; ! 406: shell $(OemSetupFilePath) Identify ! 407: ifstr(i) $($R0) == "STATUS_SUCCESSFUL" ! 408: ifcontains(i) $($R1) in $(OptionTypeList) ! 409: Set OptionType = $($R1) ! 410: shell $(OemSetupFilePath) ReturnOptions $($0) $(!STF_BUSTYPE) ! 411: ifstr(i) $($R0) == STATUS_SUCCESSFUL ! 412: set OemList = $($R1) ! 413: set OemTextList = $($R2) ! 414: goto m_asksingleselection ! 415: endif ! 416: endif ! 417: endif ! 418: endif ! 419: ; ! 420: ; The file wasn't found or isn't in NT format; try the alternate name. ! 421: ; ! 422: ifstr(i) $(InfName) == $(InfName1) ! 423: Set InfName = $(InfName2) ! 424: goto m_ask_inf_retry ! 425: endif ! 426: ! 427: read-syms NonFatalError$(NfError)$($0) ! 428: shell "subroutn.inf" SetupMessage $($0) "NONFATAL" $(NonFatal) ! 429: goto m_ask_dodiskette ! 430: ! 431: ; ! 432: ; Present the OEM options to the user. Let the user select. If ! 433: ; the user selects to cancel, don't change anything, just return ! 434: ; ! 435: ! 436: m_asksingleselection = + ! 437: shell "" DoSingleOption $(OemList) $(OemTextList) $(OptDiskette) ! 438: ifstr(i) $($R0) == STATUS_FAILED ! 439: set Status = STATUS_FAILED ! 440: goto m_finish_GetOEMOption ! 441: else-ifstr(i) $($R0) == STATUS_USERCANCEL ! 442: set Status = STATUS_USERCANCEL ! 443: goto m_finish_GetOEMOption ! 444: endif ! 445: ! 446: set OptionChosen = $($R1) ! 447: set OptionChosenText = $($R2) ! 448: ! 449: ; ! 450: ; Determine the file name to use to copy over. First see if the INF ! 451: ; is a duplicate ! 452: ; ! 453: ! 454: set Duplicate = FALSE ! 455: ForListDo $($1) ! 456: ifstr(i) *($($), 2) == $(OemList) ! 457: set OemFileName = *($($), 1) ! 458: set Duplicate = TRUE ! 459: FlushInf $(OemFileName) ! 460: goto m_copyinf ! 461: endif ! 462: EndForListDo ! 463: ! 464: ; ! 465: ; Not a duplicate, we need to copy it under a unique name. ! 466: ; ! 467: ! 468: set Num = 0 ! 469: Set Abb = *($(TypeAbbs),~($(TypeNames),$(OptionType))) ! 470: ! 471: m_nextinf = + ! 472: ifint $(Num) < 99 ! 473: set OemFileName = "oem"$(Abb)$(Num)".inf" ! 474: Debug-Output "OTHER.INF: Checking winsyspath for "$(OemFileName) ! 475: ! 476: set FileToCheck = $(!STF_WINDOWSSYSPATH)"\"$(OemFileName) ! 477: install Install-SeeIfFileIsPresent ! 478: ifstr(i) $(STATUS) == "YES" ! 479: set-add Num = $(Num) 1 ! 480: goto m_nextinf ! 481: else ! 482: goto m_copyinf ! 483: endif ! 484: endif ! 485: goto m_finish_GetOEMOption ! 486: ! 487: m_copyinf = + ! 488: ; ! 489: ; copy the INF over to the windows system directory ! 490: ; ! 491: set OemSrc = $(OemSetupFilePath) ! 492: set OemDst = $(!STF_WINDOWSSYSPATH)"\"$(OemFileName) ! 493: install Install-OemINF ! 494: ; ! 495: ; form the new oem option list ! 496: ; ! 497: ifstr(i) $(Duplicate) == TRUE ! 498: else ! 499: set NewOemOptionList = >($(NewOemOptionList), {$(OemFileName), $(OemList), $(OemTextList)}) ! 500: endif ! 501: set Status = STATUS_SUCCESSFUL ! 502: ! 503: m_finish_GetOEMOption = + ! 504: FlushInf $(InfName) ! 505: Return $(Status) $(NewOemOptionList) $(OptionChosen) $(OptionChosenText) $(OptDisketteSrc) ! 506: ! 507: ;----------------------------------------------------------------------- ! 508: ; ! 509: ; ROUTINE: DoDiskette ! 510: ; ! 511: ; DESCRIPTION: This routine prompts the OEM for the source of the OEM ! 512: ; Diskette ! 513: ; ! 514: ; INPUTS: $0: Language ! 515: ; $1: OemDiskette ! 516: ; $2: OemDisketteSrc ! 517: ; ! 518: ; OUTPUTS: $R0: STATUS: STATUS_SUCCESSFUL | ! 519: ; STATUS_USERCANCEL | ! 520: ; STATUS_FAILED ! 521: ; ! 522: ; $R1: Diskette Src ! 523: ; ! 524: ;------------------------------------------------------------------------ ! 525: ! 526: ! 527: [DoDiskette] ! 528: ; ! 529: ; ! 530: set Status = STATUS_FAILED ! 531: set OemDiskette = $($1) ! 532: set OemDisketteSrc = $($2) ! 533: ! 534: Debug-Output $(STF_CONTEXTINFNAME)": DoDiskette called" ! 535: ! 536: read-syms DisketteDlg$($0) ! 537: ui start "Diskette" ! 538: ifstr(i) $(DLGEVENT) == "CONTINUE" ! 539: set OemDisketteSrc = $(EditTextOut) ! 540: ui pop 1 ! 541: set Status = STATUS_SUCCESSFUL ! 542: goto finish_dodiskette ! 543: else-ifstr(i) $(DLGEVENT) == "BACK" ! 544: ui pop 1 ! 545: set Status = STATUS_USERCANCEL ! 546: goto finish_dodiskette ! 547: else ! 548: ui pop 1 ! 549: goto finish_dodiskette ! 550: endif ! 551: ! 552: finish_dodiskette = + ! 553: Return $(Status) $(OemDisketteSrc) ! 554: ! 555: ;----------------------------------------------------------------------- ! 556: ; ! 557: ; ROUTINE: DoSingleOption ! 558: ; ! 559: ; DESCRIPTION: This routine presents the OEM Options to the user to ! 560: ; get a selectiom ! 561: ; ! 562: ; INPUTS: $0: OptionList ! 563: ; $1: OptionTextList ! 564: ; $2: OptionTypeText ! 565: ; ! 566: ; OUTPUTS: $R0: STATUS: STATUS_SUCCESSFUL | ! 567: ; STATUS_USERCANCEL | ! 568: ; STATUS_FAILED ! 569: ; ! 570: ; $R1: OptionChosen ! 571: ; $R2: OptionChosenText ! 572: ; ! 573: ;------------------------------------------------------------------------ ! 574: ! 575: ! 576: [DoSingleOption] ! 577: ! 578: set Status = STATUS_FAILED ! 579: set OemOptionChosen = "" ! 580: set OemOptionChosenText = "" ! 581: set OemOptionList = $($0) ! 582: set OemOptionTextList = $($1) ! 583: set OemOptionTypeText = $($2) ! 584: ! 585: read-syms OemSingleOptionDlg$(!STF_LANGUAGE) ! 586: ui start "Diskette" ! 587: ifstr(i) $(DLGEVENT) == "CONTINUE" ! 588: ! 589: ui pop 1 ! 590: ifstr(i) $(ListItemsOut) == "" ! 591: set Status = STATUS_USERCANCEL ! 592: else ! 593: set OemOptionChosenText = $(ListItemsOut) ! 594: set OemOptionChosen = *($($0), ~($(ListItemsIn), $(ListItemsOut))) ! 595: set Status = STATUS_SUCCESSFUL ! 596: endif ! 597: ! 598: goto finish_dosingleoption ! 599: ! 600: else-ifstr(i) $(DLGEVENT) == "BACK" ! 601: ui pop 1 ! 602: set Status = STATUS_USERCANCEL ! 603: goto finish_dosingleoption ! 604: else ! 605: ui pop 1 ! 606: set Status = STATUS_FAILED ! 607: goto finish_dosingleoption ! 608: ! 609: endif ! 610: ! 611: finish_dosingleoption = + ! 612: Return $(Status) $(OemOptionChosen) $(OemOptionChosenText) ! 613: ! 614: ! 615: ! 616: ! 617: ! 618: [Install-SeeIfFileIsPresent] ! 619: LibraryProcedure STATUS,$(!LIBHANDLE), CheckFileExistance $(FileToCheck) ! 620: exit ! 621: ! 622: ! 623: ! 624: ! 625: [Install-OemINF] ! 626: LibraryProcedure STATUS,$(!LIBHANDLE), CopySingleFile $(OemSrc) $(OemDst) ! 627: exit ! 628: ! 629: ! 630:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.