;----------------------------------------------------------------------- ; SETUP INFORMATION FOR TOSHIBA PHOTO CD CLASS DRIVER ;----------------------------------------------------------------------- ;------------------------------------------------------------------------ [Identification] OptionType = SCSI ;------------------------------------------------------------------------ [LanguagesSupported] ENG ;------------------------------------------------------------------------ [Options] TOSHPCD = toshpcd ;------------------------------------------------------------------------ [OptionsTextENG] TOSHPCD = "Toshiba Photo CD class driver" ;------------------------------------------------------------------------ [ClassDrivers] toshpcd = !SERVICE_KERNEL_DRIVER, "SCSI Class" , !SERVICE_ERROR_NORMAL, "\SCSI Miniport", "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\drivers\toshpcd.sys" , 7 ;------------------------------------------------------------------------ [Identify] read-syms Identification set Status = STATUS_SUCCESSFUL set Identifier = $(OptionType) set Media = #("Source Media Descriptions", 1, 1) Return $(Status) $(Identifier) $(Media) ;------------------------------------------------------------------------ [ReturnOptions] set Status = STATUS_FAILED set OptionList = {} set OptionTextList = {} set LanguageList = ^(LanguagesSupported, 1) Ifcontains(i) $($0) in $(LanguageList) goto returnoptions else set Status = STATUS_NOLANGUAGE goto finish_ReturnOptions endif returnoptions = + set OptionList = ^(Options, 0) set OptionTextList = ^(OptionsText$($0), 1) set Status = STATUS_SUCCESSFUL finish_ReturnOptions = + Return $(Status) $(OptionList) $(OptionTextList) ;------------------------------------------------------------------------ [InstallOption] set Status = STATUS_FAILED set DrivesToFree = {} ifstr(i) $($1) == NONE set Status = STATUS_SUCCESSFUL goto finish_InstallOption else-ifstr(i) $($1) == UNKNOWN set Status = STATUS_SUCCESSFUL goto finish_InstallOption endif set Option = $($1) set SrcDir = $($2) set AddCopy = $($3) set DoCopy = $($4) set DoConfig = $($5) set LanguageList = ^(LanguagesSupported, 1) Ifcontains(i) $($0) in $(LanguageList) else set Status = STATUS_NOLANGUAGE goto finish_InstallOption endif read-syms Strings$($0) set OptionList = ^(Options, 0) ifcontains $(Option) in $(OptionList) else goto finish_InstallOption endif set OptionList = "" set ClassDriver = #(Options, $(Option), 1) set Type = $(#(ClassDrivers, $(ClassDriver), 1)) set Group = #(ClassDrivers, $(ClassDriver), 2) set ErrorControl = $(#(ClassDrivers, $(ClassDriver), 3)) set Dependencies = #(ClassDrivers, $(ClassDriver), 4) set EventMessageFile = #(ClassDrivers, $(ClassDriver), 5) set TypesSupported = #(ClassDrivers, $(ClassDriver), 6) installtheoption = + ifstr(i) $(AddCopy) == "YES" set DoActualCopy = NO set FileToCheck = #(Files-PhotoClassDrivers, $(ClassDriver), 2) LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck) ifstr(i) $(STATUS) == NO set DoActualCopy = YES endif ifstr(i) $(DoActualCopy) == NO shell "subroutn.inf" DriversExist $($0) $(String1) ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "CLASS.INF: shelling DriversExist failed" goto finish_InstallOption endif ifstr(i) $($R0) == STATUS_CURRENT else-ifstr(i) $($R0) == STATUS_NEW set DoActualCopy = YES else-ifstr(i) $($R0) == STATUS_USERCANCEL Debug-Output "CLASS.INF: User cancelled Tape installation" goto finish_InstallOption else Debug-Output "CLASS.INF: Error reported in DriversExist routine in SUBROUTN.INF" goto finish_InstallOption endif endif ifstr(i) $(DoActualCopy) == YES shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2) ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "CLASS.INF: shelling DoAskSource failed" goto finish_InstallOption endif ifstr(i) $($R0) == STATUS_SUCCESSFUL set SrcDir = $($R1) ifstr(i) $($R2) != "" set DrivesToFree = >($(DrivesToFree), $($R2)) endif else Debug-Output "CLASS.INF: User cancelled asking source." goto finish_InstallOption endif install Install-AddCopyOption ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS" Debug-Output "Adding files to copy list failed" goto finish_InstallOption endif else set DoCopy = NO endif endif ifstr(i) $(DoCopy) == "YES" read-syms ProgressCopy$($0) install Install-DoCopyOption ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE" Debug-Output "Copying files failed" goto finish_InstallOption else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT" set Status = STATUS_USERCANCEL goto finish_InstallOption endif endif ifstr(i) $(DoConfig) == "YES" shell "registry.inf" CheckSetupModify ifint $($ShellCode) != $(!SHELL_CODE_OK) goto finish_InstallOption endif ifstr(i) $($R0) != STATUS_SUCCESSFUL goto finish_InstallOption endif set ServiceNode = $(ClassDriver) set ServiceBinary = %SystemRoot%\System32\drivers\#(Files-PhotoClassDrivers, $(ClassDriver), 2) set ServicesValues = { + {Type, 0, $(!REG_VT_DWORD), $(Type) }, + {Start, 0, $(!REG_VT_DWORD), $(!SERVICE_AUTO_START) }, + {Group, 0, $(!REG_VT_SZ), $(Group) }, + {ErrorControl, 0, $(!REG_VT_DWORD), $(ErrorControl) }, + {Dependencies, 0, $(!REG_VT_MULTI_SZ), {$(Dependencies)} }, + {BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary) } + } set ParametersValues = "" set DeviceValues = {} set EventLogValues = { + {EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, + {TypesSupported, 0, $(!REG_VT_DWORD), $(TypesSupported) } + } shell "registry.inf" MakeServicesEntry $(ServiceNode) + $(ServicesValues) + $(ParametersValues) + $(DeviceValues) + $(EventLogValues) + Parameters ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "Couldn't execute MakeServicesEntry in registry.inf" goto finish_InstallOption endif ifstr(i) $($R0) != STATUS_SUCCESSFUL Debug-Output "MakeServicesEntry failed for class driver" goto finish_InstallOption endif endif set Status = STATUS_SUCCESSFUL finish_InstallOption = + ForListDo $(DrivesToFree) LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE" EndForListDo Return $(Status) ;------------------------------------------------------------------------ [Install-AddCopyOption] AddSectionKeyFileToCopyList Files-PhotoClassDrivers + $(ClassDriver) + $(SrcDir) + $(!STF_WINDOWSSYSPATH)\drivers exit ;------------------------------------------------------------------------ [Install-DoCopyOption] CopyFilesInCopyList exit ;------------------------------------------------------------------------- [DeInstallOption] set Status = STATUS_FAILED set Option = $($1) set LanguageList = ^(LanguagesSupported, 1) Ifcontains(i) $($0) in $(LanguageList) else set Status = STATUS_NOLANGUAGE goto finish_DeInstallOption endif read-syms Strings$($0) set OptionList = ^(Options, 0) ifcontains $(Option) in $(OptionList) else goto finish_DeInstallOption endif set OptionList = "" set ClassDriver = #(Options, $(Option), 1) set ClassFile = #(Files-PhotoClassDrivers, $(ClassDriver), 2) set FilePath = $(!STF_WINDOWSSYSPATH)"\drivers\"$(ClassFile) shell "registry.inf" RemoveServicesEntry $(ClassDriver) ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "CLASS.INF: Failed to shell RemoveServicesEntry" goto finish_DeInstallOption endif ifstr(i) $($R0) != STATUS_SUCCESSFUL Debug-Output "CLASS.INF: Failed to disable services entry" goto finish_DeInstallOption endif set Status = STATUS_SUCCESSFUL finish_DeInstallOption =+ return $(Status) ;------------------------------------------------------------------------- [GetInstalledOptions] set Status = STATUS_FAILED set InstalledOptions = {} set InstalledOptionsText = {} set LanguageList = ^(LanguagesSupported, 1) Ifcontains(i) $($0) in $(LanguageList) else set Status = STATUS_NOLANGUAGE goto finish_GetInstalledOptions endif set OptionList = ^(Options, 0) ForListDo $(OptionList) set ClassDriver = #(Options, $($), 1) set ClassFile = #(Files-PhotoClassDrivers, $(ClassDriver), 2) set FilePath = $(!STF_WINDOWSSYSPATH)"\drivers\"$(ClassFile) LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath) ifstr(i) $(STATUS) == "YES" shell "registry.inf" GetServicesEntryStart $(ClassDriver) ifint $($ShellCode) == $(!SHELL_CODE_OK) ifstr(i) $($R0) == STATUS_SUCCESSFUL ifstr(i) $($R1) != $(!SERVICE_DISABLED) set OptionText = #(OptionsText$($0), $($), 1) set InstalledOptions = >($(InstalledOptions), $($)) set InstalledOptionsText = >($(InstalledOptionsText), $(OptionText)) endif endif endif endif EndForListDo set Status = STATUS_SUCCESSFUL finish_GetInstalledOptions =+ Return $(Status) $(InstalledOptions) $(InstalledOptionsText) ;************************************************************************** ; PROGRESS GUAGE VARIABLES ;************************************************************************** [ProgressCopyENG] ProCaption = "Windows NT Setup" ProCancel = "Cancel" ProCancelMsg = "Windows NT is not correcly installed. Are you sure you want "+ "to cancel copying files?" ProCancelCap = "Setup Message" ProText1 = "Copying:" ProText2 = "To:" [StringsENG] String1 = "Toshiba Photo CD class driver" String2 = "Please enter the full path to the Photo CD class driver "+ "files. Then choose Continue." [Source Media Descriptions] 1 = "Toshiba Photo CD class driver" , TAGFILE = disk1 [Files-PhotoClassDrivers] toshpcd = 1,toshpcd.sys , SIZE=32768