|
|
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 = TAPE ! 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: OEMTAPE = oemtape ! 37: ! 38: ;----------------------------------------------------------------------- ! 39: ; OPTION TEXT SECTION ! 40: ; ------------------- ! 41: ; These are text strings used to identify the option to the user. There ! 42: ; are separate sections for each language supported. The format of the ! 43: ; section name is "OptionsText" concatenated with the Language represented ! 44: ; by the section. ! 45: ; ! 46: ;----------------------------------------------------------------------- ! 47: ! 48: [OptionsTextENG] ! 49: OEMTAPE = "Oem Version of 4 millimeter DAT drive" ! 50: ! 51: ;----------------------------------------------------------------------------------------- ! 52: ; TAPE CLASS DRIVERS: ! 53: ; ! 54: ; Order of the information: ! 55: ; ! 56: ; Class driver = Type, Group, ErrorControl, Dependencies, EventMessageFile, TypesSupported ! 57: ; ! 58: ; NOTE: \ in the dependency list means that the dependency is on a group. ! 59: ;----------------------------------------------------------------------------------------- ! 60: ! 61: [ClassDrivers] ! 62: oemtape = !SERVICE_KERNEL_DRIVER, "SCSI Class" , !SERVICE_ERROR_NORMAL, "\SCSI Miniport", "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\drivers\oemtape.sys" , 7 ! 63: ! 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: ; Check if NONE or UNKNOWN ! 169: ; ! 170: ifstr(i) $($1) == NONE ! 171: set Status = STATUS_SUCCESSFUL ! 172: goto finish_InstallOption ! 173: else-ifstr(i) $($1) == UNKNOWN ! 174: set Status = STATUS_SUCCESSFUL ! 175: goto finish_InstallOption ! 176: endif ! 177: ! 178: ; ! 179: ; extract parameters ! 180: ; ! 181: set Option = $($1) ! 182: set SrcDir = $($2) ! 183: set AddCopy = $($3) ! 184: set DoCopy = $($4) ! 185: set DoConfig = $($5) ! 186: ! 187: ; ! 188: ; Check if the language requested is supported ! 189: ; ! 190: set LanguageList = ^(LanguagesSupported, 1) ! 191: Ifcontains(i) $($0) in $(LanguageList) ! 192: else ! 193: set Status = STATUS_NOLANGUAGE ! 194: goto finish_InstallOption ! 195: endif ! 196: read-syms Strings$($0) ! 197: ! 198: ; ! 199: ; check to see if Option is supported. ! 200: ; ! 201: ! 202: set OptionList = ^(Options, 0) ! 203: ifcontains $(Option) in $(OptionList) ! 204: else ! 205: goto finish_InstallOption ! 206: endif ! 207: set OptionList = "" ! 208: ! 209: ; ! 210: ; Option has been defined already ! 211: ; ! 212: ! 213: set ClassDriver = #(Options, $(Option), 1) ! 214: set Type = $(#(ClassDrivers, $(ClassDriver), 1)) ! 215: set Group = #(ClassDrivers, $(ClassDriver), 2) ! 216: set ErrorControl = $(#(ClassDrivers, $(ClassDriver), 3)) ! 217: set Dependencies = #(ClassDrivers, $(ClassDriver), 4) ! 218: set EventMessageFile = #(ClassDrivers, $(ClassDriver), 5) ! 219: set TypesSupported = #(ClassDrivers, $(ClassDriver), 6) ! 220: ! 221: installtheoption = + ! 222: ! 223: ; ! 224: ; Code to add files to copy list ! 225: ; ! 226: ! 227: ifstr(i) $(AddCopy) == "YES" ! 228: set DoActualCopy = NO ! 229: set FileToCheck = #(Files-TapeClassDrivers, $(ClassDriver), 2) ! 230: LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck) ! 231: ifstr(i) $(STATUS) == NO ! 232: set DoActualCopy = YES ! 233: endif ! 234: ! 235: ifstr(i) $(DoActualCopy) == NO ! 236: shell "subroutn.inf" DriversExist $($0) $(String1) ! 237: ifint $($ShellCode) != $(!SHELL_CODE_OK) ! 238: Debug-Output "TAPE.INF: shelling DriversExist failed" ! 239: goto finish_InstallOption ! 240: endif ! 241: ! 242: ifstr(i) $($R0) == STATUS_CURRENT ! 243: else-ifstr(i) $($R0) == STATUS_NEW ! 244: set DoActualCopy = YES ! 245: else-ifstr(i) $($R0) == STATUS_USERCANCEL ! 246: Debug-Output "TAPE.INF: User cancelled Tape installation" ! 247: goto finish_InstallOption ! 248: else ! 249: Debug-Output "TAPE.INF: Error reported in DriversExist routine in SUBROUTN.INF" ! 250: goto finish_InstallOption ! 251: endif ! 252: endif ! 253: ! 254: ifstr(i) $(DoActualCopy) == YES ! 255: ! 256: shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2) ! 257: ifint $($ShellCode) != $(!SHELL_CODE_OK) ! 258: Debug-Output "TAPE.INF: shelling DoAskSource failed" ! 259: goto finish_InstallOption ! 260: endif ! 261: ! 262: ifstr(i) $($R0) == STATUS_SUCCESSFUL ! 263: set SrcDir = $($R1) ! 264: ifstr(i) $($R2) != "" ! 265: set DrivesToFree = >($(DrivesToFree), $($R2)) ! 266: endif ! 267: else ! 268: Debug-Output "TAPE.INF: User cancelled asking source." ! 269: goto finish_InstallOption ! 270: endif ! 271: ! 272: install Install-AddCopyOption ! 273: ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS" ! 274: Debug-Output "Adding mouse files to copy list failed" ! 275: goto finish_InstallOption ! 276: endif ! 277: else ! 278: set DoCopy = NO ! 279: endif ! 280: ! 281: endif ! 282: ! 283: ifstr(i) $(DoCopy) == "YES" ! 284: read-syms ProgressCopy$($0) ! 285: install Install-DoCopyOption ! 286: ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE" ! 287: Debug-Output "Copying files failed" ! 288: goto finish_InstallOption ! 289: else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT" ! 290: set Status = STATUS_USERCANCEL ! 291: goto finish_InstallOption ! 292: endif ! 293: endif ! 294: ! 295: ifstr(i) $(DoConfig) == "YES" ! 296: ; ! 297: ; first run a privilege check on modifying the setup node ! 298: ; ! 299: ! 300: shell "registry.inf" CheckSetupModify ! 301: ifint $($ShellCode) != $(!SHELL_CODE_OK) ! 302: goto finish_InstallOption ! 303: endif ! 304: ! 305: ifstr(i) $($R0) != STATUS_SUCCESSFUL ! 306: goto finish_InstallOption ! 307: endif ! 308: ! 309: ; ! 310: ; then make a new tape entry, the entry is created automatically ! 311: ; enabled ! 312: ; ! 313: ! 314: set ServiceNode = $(ClassDriver) ! 315: set ServiceBinary = %SystemRoot%\System32\drivers\#(Files-TapeClassDrivers, $(ClassDriver), 2) ! 316: ! 317: set ServicesValues = { + ! 318: {Type, 0, $(!REG_VT_DWORD), $(Type) }, + ! 319: {Start, 0, $(!REG_VT_DWORD), $(!SERVICE_SYSTEM_START) }, + ! 320: {Group, 0, $(!REG_VT_SZ), $(Group) }, + ! 321: {ErrorControl, 0, $(!REG_VT_DWORD), $(ErrorControl) }, + ! 322: {Dependencies, 0, $(!REG_VT_MULTI_SZ), {$(Dependencies)} }, + ! 323: {BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary) } + ! 324: } ! 325: set ParametersValues = "" ! 326: set DeviceValues = {} ! 327: set EventLogValues = { + ! 328: {EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, + ! 329: {TypesSupported, 0, $(!REG_VT_DWORD), $(TypesSupported) } + ! 330: } ! 331: ! 332: ! 333: shell "registry.inf" MakeServicesEntry $(ServiceNode) + ! 334: $(ServicesValues) + ! 335: $(ParametersValues) + ! 336: $(DeviceValues) + ! 337: $(EventLogValues) + ! 338: Parameters ! 339: ! 340: ifint $($ShellCode) != $(!SHELL_CODE_OK) ! 341: Debug-Output "Couldn't execute MakeServicesEntry in registry.inf" ! 342: goto finish_InstallOption ! 343: endif ! 344: ! 345: ifstr(i) $($R0) != STATUS_SUCCESSFUL ! 346: Debug-Output "MakeServicesEntry failed for tape" ! 347: goto finish_InstallOption ! 348: endif ! 349: ! 350: endif ! 351: ! 352: set Status = STATUS_SUCCESSFUL ! 353: finish_InstallOption = + ! 354: ForListDo $(DrivesToFree) ! 355: LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE" ! 356: EndForListDo ! 357: ! 358: Return $(Status) ! 359: ! 360: ! 361: [Install-AddCopyOption] ! 362: ! 363: ; ! 364: ; Add the files to the copy list ! 365: ; ! 366: AddSectionKeyFileToCopyList Files-TapeClassDrivers + ! 367: $(ClassDriver) + ! 368: $(SrcDir) + ! 369: $(!STF_WINDOWSSYSPATH)\drivers ! 370: ! 371: exit ! 372: ! 373: ! 374: [Install-DoCopyOption] ! 375: ! 376: ; ! 377: ; Copy files in the copy list ! 378: ; ! 379: CopyFilesInCopyList ! 380: exit ! 381: ! 382: ! 383: ;------------------------------------------------------------------------- ! 384: ; 4. DeInstallOption: ! 385: ; ! 386: ; FUNCTION: To remove files representing Option ! 387: ; To remove the registry entry corresponding to the Option ! 388: ; ! 389: ; INPUT: $($0): Language to use ! 390: ; $($1): OptionID to install ! 391: ; ! 392: ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL | ! 393: ; STATUS_NOLANGUAGE | ! 394: ; STATUS_USERCANCEL | ! 395: ; STATUS_FAILED ! 396: ;------------------------------------------------------------------------- ! 397: [DeInstallOption] ! 398: ; ! 399: ; Set default values for ! 400: ; ! 401: set Status = STATUS_FAILED ! 402: ! 403: ; ! 404: ; extract parameters ! 405: ; ! 406: set Option = $($1) ! 407: ! 408: ; ! 409: ; Check if the language requested is supported ! 410: ; ! 411: set LanguageList = ^(LanguagesSupported, 1) ! 412: Ifcontains(i) $($0) in $(LanguageList) ! 413: else ! 414: set Status = STATUS_NOLANGUAGE ! 415: goto finish_DeInstallOption ! 416: endif ! 417: read-syms Strings$($0) ! 418: ! 419: ; ! 420: ; check to see if Option is supported. ! 421: ; ! 422: ! 423: set OptionList = ^(Options, 0) ! 424: ifcontains $(Option) in $(OptionList) ! 425: else ! 426: goto finish_DeInstallOption ! 427: endif ! 428: set OptionList = "" ! 429: ! 430: ; ! 431: ; fetch details about option ! 432: ; ! 433: ! 434: set ClassDriver = #(Options, $(Option), 1) ! 435: set ClassFile = #(Files-TapeClassDrivers, $(ClassDriver), 2) ! 436: set FilePath = $(!STF_WINDOWSSYSPATH)"\drivers\"$(ClassFile) ! 437: ! 438: ; ! 439: ; disable the registry entry ! 440: ; ! 441: ! 442: shell "registry.inf" RemoveServicesEntry $(ClassDriver) ! 443: ifint $($ShellCode) != $(!SHELL_CODE_OK) ! 444: Debug-Output "TAPE.INF: Failed to shell RemoveServicesEntry" ! 445: goto finish_DeInstallOption ! 446: endif ! 447: ! 448: ifstr(i) $($R0) != STATUS_SUCCESSFUL ! 449: Debug-Output "TAPE.INF: Failed to disable services entry" ! 450: goto finish_DeInstallOption ! 451: endif ! 452: ! 453: ; ! 454: ; we won't remove the file because we can only do so during the next boot. ! 455: ; if the user chooses to reinstall the same driver during this boot ! 456: ; he will still end up deleting the driver on next boot. if the file ! 457: ; should be deleted a warning should be put up saying that the user should ! 458: ; not try to reinstall the driver during this boot ! 459: ; ! 460: ; AddFileToDeleteList $(FilePath) ! 461: ! 462: ! 463: set Status = STATUS_SUCCESSFUL ! 464: ! 465: finish_DeInstallOption =+ ! 466: return $(Status) ! 467: ! 468: ! 469: ;------------------------------------------------------------------------- ! 470: ; 5. GetInstalledOptions: ! 471: ; ! 472: ; FUNCTION: To find out the list of options which are installed ! 473: ; ! 474: ; INPUT: $($0): Language to Use ! 475: ; ! 476: ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL | ! 477: ; STATUS_FAILED ! 478: ; ! 479: ; $($R1): List of options installed ! 480: ; $($R2): Option installed Text List ! 481: ;------------------------------------------------------------------------- ! 482: [GetInstalledOptions] ! 483: set Status = STATUS_FAILED ! 484: set InstalledOptions = {} ! 485: set InstalledOptionsText = {} ! 486: ! 487: ; ! 488: ; Check if the language requested is supported ! 489: ; ! 490: set LanguageList = ^(LanguagesSupported, 1) ! 491: Ifcontains(i) $($0) in $(LanguageList) ! 492: else ! 493: set Status = STATUS_NOLANGUAGE ! 494: goto finish_GetInstalledOptions ! 495: endif ! 496: ! 497: set OptionList = ^(Options, 0) ! 498: ForListDo $(OptionList) ! 499: set ClassDriver = #(Options, $($), 1) ! 500: set ClassFile = #(Files-TapeClassDrivers, $(ClassDriver), 2) ! 501: set FilePath = $(!STF_WINDOWSSYSPATH)"\drivers\"$(ClassFile) ! 502: LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath) ! 503: ifstr(i) $(STATUS) == "YES" ! 504: shell "registry.inf" GetServicesEntryStart $(ClassDriver) ! 505: ifint $($ShellCode) == $(!SHELL_CODE_OK) ! 506: ifstr(i) $($R0) == STATUS_SUCCESSFUL ! 507: ifstr(i) $($R1) != $(!SERVICE_DISABLED) ! 508: set OptionText = #(OptionsText$($0), $($), 1) ! 509: set InstalledOptions = >($(InstalledOptions), $($)) ! 510: set InstalledOptionsText = >($(InstalledOptionsText), $(OptionText)) ! 511: endif ! 512: endif ! 513: endif ! 514: endif ! 515: EndForListDo ! 516: set Status = STATUS_SUCCESSFUL ! 517: finish_GetInstalledOptions =+ ! 518: Return $(Status) $(InstalledOptions) $(InstalledOptionsText) ! 519: ! 520: ;************************************************************************** ! 521: ; PROGRESS GUAGE VARIABLES ! 522: ;************************************************************************** ! 523: ! 524: [ProgressCopyENG] ! 525: ProCaption = "Windows NT Setup" ! 526: ProCancel = "Cancel" ! 527: ProCancelMsg = "Windows NT is not correcly installed. Are you sure you want "+ ! 528: "to cancel copying files?" ! 529: ProCancelCap = "Setup Message" ! 530: ProText1 = "Copying:" ! 531: ProText2 = "To:" ! 532: ! 533: [StringsENG] ! 534: String1 = "Tape Device" ! 535: String2 = "Please enter the full path to the OEM Tape Device "+ ! 536: "files. Then choose Continue." ! 537: ! 538: [Source Media Descriptions] ! 539: 1 = "OEM DISK (TAPE)" , TAGFILE = disk1 ! 540: ! 541: [Files-TapeClassDrivers] ! 542: oemtape = 1,oemtape.sys , SIZE=999
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.