home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1996 November
/
VPR9611B.ISO
/
driver
/
iodata
/
rsa_140
/
rsa_140.upd
/
NT
/
RSA98
/
OEMSETUP.INF
next >
Wrap
INI File
|
1996-02-27
|
66KB
|
1,664 lines
;-----------------------------------------------------------------------
; OPTION TYPE
; -----------
; This identifies the Option type we are dealing with. The different
; possible types are:
;
; COMPUTER, VIDEO, POINTER, KEYBOARD, LAYOUT, SCSI, TAPE, PRINTER, ...
;-----------------------------------------------------------------------
[Identification]
OptionType = POINTER
;-----------------------------------------------------------------------
; LANGUAGES SUPPORTED
; -------------------
;
; The languages supported by the INF, For every language supported
; we need to have a separate text section for every displayable text
; section.
;
;-----------------------------------------------------------------------
[LanguagesSupported]
ENG
;-----------------------------------------------------------------------
; OPTION LIST
; -----------
; This section lists the Option key names. These keys are locale
; independent and used to represent the option in a locale independent
; manner.
;
;-----------------------------------------------------------------------
[Options]
"SerRSA98" = SerRSA98
;-----------------------------------------------------------------------
; OPTION TEXT SECTION
; -------------------
; These are text strings used to identify the option to the user. There
; are separate sections for each language supported. The format of the
; section name is "OptionsText" concatenated with the Language represented
; by the section.
;
;-----------------------------------------------------------------------
[OptionsTextENG]
;; "SerRSA98" = "PC-9800 シリアルポート(2チャンネル)"
"SerRSA98" = "アイ・オー・データ 高速シリアルボード RSA-98シリーズ"
[FileConstants]
!MAXIMUM_ALLOWED = 33554432
;-----------------------------------------------------------------------------------------
; RS-232C CARD DRIVERS:
;
; Order of the information:
;
; Class driver = Type, Group, ErrorControl, Tag, EventMessageFile, TypesSupported
;
;-----------------------------------------------------------------------------------------
[RsDrivers]
;; SerRSA98 = !SERVICE_KERNEL_DRIVER, "Extended base", !SERVICE_ERROR_IGNORE, 3, %SystemRoot%\System32\IoLogMsg.dll, 7, 5, 568
; fujino 960226
; SerRSA98 = !SERVICE_KERNEL_DRIVER, "Extended base", !SERVICE_ERROR_IGNORE, 3, %SystemRoot%\System32\IoLogMsg.dll, 7, 3, 20704,20704,6
SerRSA98 = !SERVICE_KERNEL_DRIVER, "Extended base", !SERVICE_ERROR_IGNORE, 3, %SystemRoot%\System32\IoLogMsg.dll, 7, 3, 20704,20704,6,3,20705
; IRQ=3, IOBase=01B0h(432)
;---------------------------------------------------------------------------
; 1. Identify
;
; DESCRIPTION: To verify that this INF deals with the same type of options
; as we are choosing currently.
;
; INPUT: None
;
; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
; $($R1): Option Type (COMPUTER ...)
; $($R2): Diskette description
;---------------------------------------------------------------------------
[Identify]
;
;
read-syms Identification
set Status = STATUS_SUCCESSFUL
set Identifier = $(OptionType)
set Media = #("Source Media Descriptions", 1, 1)
Return $(Status) $(Identifier) $(Media)
;------------------------------------------------------------------------
; 2. ReturnOptions:
;
; DESCRIPTION: To return the option list supported by this INF and the
; localised text list representing the options.
;
;
; INPUT: $($0): Language used. ( ENG | FRN | ... )
;
; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
; STATUS_NOLANGUAGE
; STATUS_FAILED
;
; $($R1): Option List
; $($R2): Option Text List
;------------------------------------------------------------------------
[ReturnOptions]
;
;
set Status = STATUS_FAILED
set OptionList = {}
set OptionTextList = {}
;
; Check if the language requested is supported
;
set LanguageList = ^(LanguagesSupported, 1)
Ifcontains(i) $($0) in $(LanguageList)
goto returnoptions
else
set Status = STATUS_NOLANGUAGE
goto finish_ReturnOptions
endif
;
; form a list of all the options and another of the text representing
;
returnoptions = +
set OptionList = ^(Options, 0)
set OptionTextList = ^(OptionsText$($0), 1)
set Status = STATUS_SUCCESSFUL
finish_ReturnOptions = +
Return $(Status) $(OptionList) $(OptionTextList)
;
; 3. InstallOption:
;
; FUNCTION: To copy files representing Options
; To configure the installed option
; To update the registry for the installed option
;
; INPUT: $($0): Language to use
; $($1): OptionID to install
; $($2): SourceDirectory
; $($3): AddCopy (YES | NO)
; $($4): DoCopy (YES | NO)
; $($5): DoConfig (YES | NO)
;
; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
; STATUS_NOLANGUAGE |
; STATUS_USERCANCEL |
; STATUS_FAILED
;
[InstallOption]
;
; Set default values for
;
set Status = STATUS_FAILED
set DrivesToFree = {}
read-syms FileConstants
;
; extract parameters
;
set Option = $($1)
set SrcDir = $($2)
set AddCopy = $($3)
set DoCopy = $($4)
set DoConfig = $($5)
;
; Check if the language requested is supported
;
set LanguageList = ^(LanguagesSupported, 1)
Ifcontains(i) $($0) in $(LanguageList)
else
set Status = STATUS_NOLANGUAGE
goto finish_InstallOption
endif
read-syms Strings$($0)
;
; check to see if Option is supported.
;
set OptionList = ^(Options, 0)
ifcontains $(Option) in $(OptionList)
else
; Debug-Output "SCSI.INF: SCSI option is not supported."
goto finish_InstallOption
endif
set OptionList = ""
;
; Option has been defined already
;
set RsDriver = #(Options, $(Option), 1)
set Type = $(#(RsDrivers, $(RsDriver), 1))
set Group = #(RsDrivers, $(RsDriver), 2)
set ErrorControl = $(#(RsDrivers, $(RsDriver), 3))
set Tag = #(RsDrivers, $(RsDriver), 4)
set EventMessageFile = #(RsDrivers, $(RsDriver), 5)
set TypesSupported = #(RsDrivers, $(RsDriver), 6)
set Interrupt = #(RsDrivers, $(RsDriver), 7)
set PortAddress = #(RsDrivers, $(RsDriver), 8)
set TimerPortAddress = #(RsDrivers, $(RsDriver), 9)
set TimerValue = #(RsDrivers, $(RsDriver), 10)
set Interrupt2 = #(RsDrivers, $(RsDriver), 11)
set PortAddress2 = #(RsDrivers, $(RsDriver), 12)
set Start = $(!SERVICE_AUTO_START)
installtheoption = +
;
; Code to add files to copy list
;
ifstr(i) $(AddCopy) == "YES"
set DoActualCopy = NO
set FileToCheck = #(Files-RsDrivers, $(RsDriver), 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)
goto finish_InstallOption
endif
ifstr(i) $($R0) == STATUS_CURRENT
else-ifstr(i) $($R0) == STATUS_NEW
set DoActualCopy = YES
else-ifstr(i) $($R0) == STATUS_USERCANCEL
goto finish_InstallOption
else
goto finish_InstallOption
endif
endif
ifstr(i) $(DoActualCopy) == YES
shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto finish_InstallOption
endif
ifstr(i) $($R0) == STATUS_SUCCESSFUL
set SrcDir = $($R1)
ifstr(i) $($R2) != ""
set DrivesToFree = >($(DrivesToFree), $($R2))
endif
else
goto finish_InstallOption
endif
install Install-AddCopyOption
ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
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"
;
; first run a privilege check on modifying the setup node
;
shell "registry.inf" CheckSetupModify
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto finish_InstallOption
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
goto finish_InstallOption
endif
;
; then make a new RS-232C entry, the entry is created automatically
; enabled
;
set ServiceNode = $(RsDriver)
set ServiceBinary = System32\drivers\#(Files-RsDrivers, $(RsDriver), 2)
set ServicesValues = { +
{Type, 0, $(!REG_VT_DWORD), $(Type) }, +
{Start, 0, $(!REG_VT_DWORD), $(Start) }, +
{Group, 0, $(!REG_VT_SZ), $(Group) }, +
{ErrorControl, 0, $(!REG_VT_DWORD), $(ErrorControl) }, +
{Tag, 0, $(!REG_VT_DWORD), $(Tag) }, +
{BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary) } +
}
set ParametersValues = { +
{TimerPortAddress, 0, $(!REG_VT_DWORD), $(TimerPortAddress) }, +
{TimerValue, 0, $(!REG_VT_DWORD), $(TimerValue) } +
}
; set DeviceValues = {}
set RSAValues = { +
{Interrupt, 0, $(!REG_VT_DWORD), $(Interrupt) }, +
{PortAddress, 0, $(!REG_VT_DWORD), $(PortAddress) } +
}
set RSA2Values = { +
{Interrupt, 0, $(!REG_VT_DWORD), $(Interrupt2) }, +
{PortAddress, 0, $(!REG_VT_DWORD), $(PortAddress2) } +
}
set EventLogValues = { +
{EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, +
{TypesSupported, 0, $(!REG_VT_DWORD), $(TypesSupported) } +
}
; fujino 960226
; shell "registry.inf" MakeServicesEntry $(ServiceNode) +
shell "" MakeServicesEntry2 $(ServiceNode) +
$(ServicesValues) +
$(ParametersValues) +
; $(DeviceValues) +
$(RSAValues) +
$(EventLogValues) +
Parameters +
"RSA1"
shell "" MakeServicesEntry2 $(ServiceNode) +
$(ServicesValues) +
$(ParametersValues) +
; $(DeviceValues) +
$(RSA2Values) +
$(EventLogValues) +
Parameters +
"RSA2"
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 RS-232C"
goto finish_InstallOption
endif
;
; Delete CurrentControlSet\Services\SerRSA98 Value
;
set SerRSA98ServiceName = "SYSTEM\CurrentControlSet\Services\SerRSA98"
OpenRegKey $(!REG_H_LOCAL) "" $(SerRSA98ServiceName) $(!MAXIMUM_ALLOWED) KeyService
Ifstr(i) $(KeyService) != $(KeyNull)
DeleteRegValue $(KeyService) "ImagePath"
; DeleteRegValue $(KeyService) "Tag"
DeleteRegKey $(KeyService) "Security"
CloseRegKey $(KeyService)
Debug-Output "SerRSA98 Service Value Deleted(Imagepath, Tag, Security)"
else
Debug-Output "SYSTEM\CurrentControlSet\Services\SerRSA98 KeyService Open Error"
endif
;;;;;;;H.K
set Parameters1 = "SYSTEM\CurrentControlSet\Services\SerRSA98\Parameters"
set ParametersKey = ""
;;fujino 960226
;; OpenRegKey $(KeyService) "" $("Parameters1") $(!MAXIMUM_ALLOWED) ParametersKey
OpenRegKey $(KeyService) "" $(Parameters1) $(!MAXIMUM_ALLOWED) ParametersKey
Ifstr(i) $(ParametersKey) != $(KeyNull)
CloseRegKey $(ParametersKey)
; Debug-Output "SerRSA98 Service Value Deleted(Imagepath, Tag, Security)"
else
; Debug-Output "SYSTEM\CurrentControlSet\Services\SerRSA98 KeyService Open Error"
endif
set RSAValues = { +
{Interrupt2, 0, $(!REG_VT_DWORD), $(Interrupt) }, +
{PortAddress2, 0, $(!REG_VT_DWORD), $(PortAddress) } +
}
; shell "" AddValueList $(ParametersKey) $(RSAValues)
set DirRSA = "SYSTEM\CurrentControlSet\Services\SerRSA98\Parameters\RSA"
set RSAKey = ""
set RSATmp = {"RSA","",""}
set NoTitle = 0
; CreateRegKey $(ParametersKSey) $(RSATmp) 0 $(!MAXIMUM_ALLOWED) "" RSAKey
;fujino 960226
; CreateRegKey $(ParametersKSey) {"RSA",0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" RSAKey
; CreateRegKey $(ParametersKSey) {"RSA98",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" RSAKey
Ifstr(i) $(RSAKey) != $(KeyNull)
CloseRegKey $(RSAKey)
; Debug-Output "SerRSA98 Service Value Deleted(Imagepath, Tag, Security)"
else
; Debug-Output "SYSTEM\CurrentControlSet\Services\SerRSA98 KeyService Open Error"
endif
;;;
endif
set Status = STATUS_SUCCESSFUL
finish_InstallOption = +
ForListDo $(DrivesToFree)
LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
EndForListDo
Return $(Status)
[Install-AddCopyOption]
;
; Add the files to the copy list
;
AddSectionKeyFileToCopyList Files-RsDrivers +
$(RsDriver) +
$(SrcDir) +
$(!STF_WINDOWSSYSPATH)\drivers
exit
[Install-DoCopyOption]
;
; Copy files in the copy list
;
CopyFilesInCopyList
exit
;-------------------------------------------------------------------------
; 4. DeInstallOption:
;
; FUNCTION: To remove files representing Option
; To remove the registry entry corresponding to the Option
;
; INPUT: $($0): Language to use
; $($1): OptionID to install
;
; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
; STATUS_NOLANGUAGE |
; STATUS_USERCANCEL |
; STATUS_FAILED
;-------------------------------------------------------------------------
[DeInstallOption]
;
; Set default values for
;
set Status = STATUS_FAILED
;
; extract parameters
;
set Option = $($1)
;
; Check if the language requested is supported
;
set LanguageList = ^(LanguagesSupported, 1)
Ifcontains(i) $($0) in $(LanguageList)
else
set Status = STATUS_NOLANGUAGE
goto finish_DeInstallOption
endif
read-syms Strings$($0)
;
; check to see if Option is supported.
;
set OptionList = ^(Options, 0)
ifcontains $(Option) in $(OptionList)
else
goto finish_DeInstallOption
endif
set OptionList = ""
;
; fetch details about option
;
set RsDriver = #(Options, $(Option), 1)
set MiniportFile = #(Files-RsDrivers, $(RsDriver), 2)
set FilePath = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
;
; check to see if file is installed
; if not give success
;
LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
ifstr(i) $(STATUS) == "NO"
set Status = STATUS_SUCCESSFUL
goto finish_DeInstallOption
endif
shell "registry.inf" GetServicesEntryStart $(RsDriver)
ifstr(i) $($R0) != "STATUS_SUCCESSFUL"
; this could happen if there is no start value or there is no
; key, in which case the option is not installed
set Status = STATUS_SUCCESSFUL
goto finish_DeInstallOption
endif
; ifstr(i) $($R1) == $(!SERVICE_BOOT_START)
; shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "WARNING" $(String3)
; ifstr(i) $($R0) != STATUS_SUCCESSFUL
; goto do_removal
; endif
; ifstr(i) $($R1) == "CANCEL"
; goto finish_DeInstallOption
; endif
; endif
do_removal =+
;
; disable the registry entry
;
shell "registry.inf" RemoveServicesEntry $(RsDriver)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto finish_DeInstallOption
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
goto finish_DeInstallOption
endif
;
; we won't remove the file because we can only do so during the next boot.
; if the user chooses to reinstall the same driver during this boot
; he will still end up deleting the driver on next boot. if the file
; should be deleted a warning should be put up saying that the user should
; not try to reinstall the driver during this boot
;
; AddFileToDeleteList $(FilePath)
set Status = STATUS_SUCCESSFUL
finish_DeInstallOption =+
return $(Status)
;-------------------------------------------------------------------------
; 5. GetInstalledOptions:
;
; FUNCTION: To find out the list of options which are installed
;
; INPUT: $($0): Language to Use
;
; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
; STATUS_FAILED
;
; $($R1): List of options installed
; $($R2): Option installed Text List
;-------------------------------------------------------------------------
[GetInstalledOptions]
set Status = STATUS_FAILED
set InstalledOptions = {}
set InstalledOptionsText = {}
;
; Check if the language requested is supported
;
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 RsDriver = #(Options, $($), 1)
set MiniportFile = #(Files-RsDrivers, $(RsDriver), 2)
set FilePath = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
ifstr(i) $(STATUS) == "YES"
shell "registry.inf" GetServicesEntryStart $(RsDriver)
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)
;; start registry
[RegistryConstants]
MaskAllAccess = 33554432
NoTitle = 0
RegLastError = $(!REG_ERROR_SUCCESS)
[WinNTKeyCreate]
set Status = STATUS_FAILED
read-syms RegistryConstants
set KeyPath = { +
{SOFTWARE, $(NoTitle), $(MaskAllAccess)}, +
{Microsoft, $(NoTitle), $(MaskAllAccess)}, +
{"Windows NT", $(NoTitle), $(MaskAllAccess)}, +
{CurrentVersion, $(NoTitle), $(MaskAllAccess)} +
}
ifstr(i) $(!STF_NTUPGRADE) == "YES"
set KeyValues = { +
{PathName, $(NoTitle), $(!REG_VT_SZ), *($($0), 1) }, +
{SoftwareType, $(NoTitle), $(!REG_VT_SZ), *($($0), 2) }, +
{InstallDate, $(NoTitle), $(!REG_VT_DWORD), *(*($($0), 5), 1) }, +
{SourcePath, $(NoTitle), $(!REG_VT_SZ), *($($0), 7) }, +
{ProductId, $(NoTitle), $(!REG_VT_SZ), *($($0), 8) } +
}
else
set KeyValues = { +
{PathName, $(NoTitle), $(!REG_VT_SZ), *($($0), 1) }, +
{SoftwareType, $(NoTitle), $(!REG_VT_SZ), *($($0), 2) }, +
{RegisteredOwner, $(NoTitle), $(!REG_VT_SZ), *($($0), 3) }, +
{RegisteredOrganization, $(NoTitle), $(!REG_VT_SZ), *($($0), 4) }, +
{InstallDate, $(NoTitle), $(!REG_VT_DWORD), *(*($($0), 5), 1) }, +
{SourcePath, $(NoTitle), $(!REG_VT_SZ), *($($0), 7) }, +
{ProductId, $(NoTitle), $(!REG_VT_SZ), *($($0), 8) } +
}
endif
shell "" CreateKey $(!REG_H_LOCAL) $(KeyPath) $(KeyValues)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto endWinNT
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
goto endWinNT
else
CloseRegKey $($R1)
endif
set KeyPath = { +
{System, $(NoTitle), $(MaskAllAccess)}, +
{$(!STF_CONTROLSET), $(NoTitle), $(MaskAllAccess)}, +
{Control, $(NoTitle), $(MaskAllAccess)}, +
{ProductOptions, $(NoTitle), $(MaskAllAccess)} +
}
set KeyValues = { +
{ProductType, $(NoTitle), $(!REG_VT_SZ), *($($0), 6) } +
}
shell "" CreateKey $(!REG_H_LOCAL) $(KeyPath) $(KeyValues)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto endWinNT
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
goto endWinNT
else
CloseRegKey $($R1)
endif
ifstr(i) $(!STF_NTUPGRADE) != "YES"
ifstr(i) *($($0), 6) != "WinNT"
set KeyPath = { +
{System, $(NoTitle), $(MaskAllAccess)}, +
{$(!STF_CONTROLSET), $(NoTitle), $(MaskAllAccess)}, +
{Control, $(NoTitle), $(MaskAllAccess)}, +
{"Session Manager", $(NoTitle), $(MaskAllAccess)} +
}
set KeyValues = { +
{RegisteredProcessors, $(NoTitle), $(!REG_VT_DWORD), 4 } +
}
shell "" CreateKey $(!REG_H_LOCAL) $(KeyPath) $(KeyValues)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto endWinNT
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
goto endWinNT
else
CloseRegKey $($R1)
endif
endif
endif
set Status = STATUS_SUCCESSFUL
endWinNT = +
Return $(Status)
[WinNTAddPid]
set Status = STATUS_FAILED
read-syms RegistryConstants
set KeyPath = { +
{SOFTWARE, $(NoTitle), $(MaskAllAccess)}, +
{Microsoft, $(NoTitle), $(MaskAllAccess)}, +
{"Windows NT", $(NoTitle), $(MaskAllAccess)}, +
{CurrentVersion, $(NoTitle), $(MaskAllAccess)} +
}
set KeyValues = { +
{ProductId, $(NoTitle), $(!REG_VT_SZ), *($($0), 1) } +
}
shell "" CreateKey $(!REG_H_LOCAL) $(KeyPath) $(KeyValues)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto endWinNTAdd
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
goto endWinNTAdd
else
CloseRegKey $($R1)
endif
set Status = STATUS_SUCCESSFUL
endWinNTAdd = +
Return $(Status)
[MakeStartupEntry]
set Status = STATUS_FAILED
read-syms RegistryConstants
set KeyPath = { +
{SOFTWARE, $(NoTitle), $(MaskAllAccess)}, +
{Microsoft, $(NoTitle), $(MaskAllAccess)}, +
{"Windows NT", $(NoTitle), $(MaskAllAccess)}, +
{CurrentVersion, $(NoTitle), $(MaskAllAccess)}, +
{"Program Manager", $(NoTitle), $(MaskAllAccess)}, +
{Settings, $(NoTitle), $(MaskAllAccess)} +
}
set KeyValues = { +
{Startup, $(NoTitle), $(!REG_VT_SZ), $($0)} +
}
shell "" CreateKey $(!REG_H_CUSER) $(KeyPath) $(KeyValues)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto end_MakeStartupEntry
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
goto end_MakeStartupEntry
else
CloseRegKey $($R1)
endif
set Status = STATUS_SUCCESSFUL
end_MakeStartupEntry = +
Return $(Status)
[GetNTSource]
set Status = STATUS_SUCCESSFUL
read-syms RegistryConstants
set NTSource = A:\
set KeyName = "Software\Microsoft\Windows NT\CurrentVersion"
OpenRegKey $(!REG_H_LOCAL) "" $(KeyName) $(!REG_KEY_READ) KeyHandle
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Couldn't open windows nt software key for read access"
goto end_getntsource
endif
GetRegValue $(KeyHandle) "SourcePath" SourcePathValue
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
CloseRegKey $(KeyHandle)
goto end_getntsource
endif
set NTSource = *($(SourcePathValue), 4)
CloseRegKey $(KeyHandle)
end_getntsource = +
Return $(Status) $(NTSource)
[AppendToBootExecute]
set Status = STATUS_FAILED
set AppendLines = $($0)
read-syms RegistryConstants
set KeyName = "System\"$(!STF_CONTROLSET)"\Control\Session Manager"
OpenRegKey $(!REG_H_LOCAL) "" $(KeyName) $(MaskAllAccess) KeyHandle
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Couldn't open session manager node for read/write access"
goto finish_appendbootexecute
endif
GetRegValue $(KeyHandle) "BootExecute" BootExecuteValue
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
set BootExecute = {}
else
set BootExecute = *($(BootExecuteValue), 4)
endif
set NewBootExecute = {}
ForListDo $(BootExecute)
set NewBootExecute = >($(NewBootExecute), $($))
EndForListDo
ForListDo $(AppendLines)
set NewBootExecute = >($(NewBootExecute), $($))
EndForListDo
set ValueInfo = {BootExecute, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NewBootExecute)}
SetRegValue $(KeyHandle) $(ValueInfo)
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
CloseRegKey $(KeyHandle)
Debug-Output "REGISTRY.INF: Couldn't set BootExecute value"
goto finish_appendbootexecute
endif
CloseRegKey $(KeyHandle)
set Status = STATUS_SUCCESSFUL
finish_appendbootexecute = +
Return $(Status)
[AppendToSystemPath]
set Status = STATUS_FAILED
read-syms RegistryConstants
set KeyName = "System\"$(!STF_CONTROLSET)"\Control\Session Manager\Environment"
OpenRegKey $(!REG_H_LOCAL) "" $(KeyName) $(MaskAllAccess) KeyHandle
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Couldn't open session manager\environment node for read/write access"
goto finish_appendsystempath0
endif
GetRegValue $(KeyHandle) "Path" PathValue
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
goto finish_appendsystempath1
endif
set NewPathValue = *($(PathValue),4)";"$($0)
set ValueInfo = {"Path", $(NoTitle), $(!REG_VT_EXPAND_SZ), $(NewPathValue)}
SetRegValue $(KeyHandle) $(ValueInfo)
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Couldn't set Path value"
goto finish_appendsystempath1
endif
set Status = STATUS_SUCCESSFUL
finish_appendsystempath1 = +
CloseRegKey $(KeyHandle)
finish_appendsystempath0 = +
Return $(Status)
[EnumeratePagingFiles]
set Status = STATUS_FAILED
set PagingFiles = {}
read-syms RegistryConstants
set KeyName = "System\"$(!STF_CONTROLSET)"\Control\Session Manager\Memory Management"
OpenRegKey $(!REG_H_LOCAL) "" $(KeyName) $(!REG_KEY_READ) KeyHandle
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Couldn't open pagefile node for read access"
goto endenumpagefile
endif
GetRegValue $(KeyHandle) "PagingFiles" PagingFilesValue
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Couldn't read PagingFiles value"
CloseRegKey $(KeyHandle)
goto endenumpagefile
endif
CloseRegKey $(KeyHandle)
ifstr(i) $(PagingFilesValue) == ""
set Status = STATUS_SUCCESSFUL
goto endenumpagefile
endif
set PagefileList = *($(PagingFilesValue), 4)
ForListDo $(PagefileList)
ifstr(i) $($) != ""
set Pagefile = $($)
Split-String $(Pagefile) " " SplitString
set PagefilePath = ""
set PagefileSize = ""
ForListDo $(SplitString)
ifstr(i) $($) != " "
ifstr(i) $(PagefilePath) == ""
set PagefilePath = $($)
else-ifstr(i) $(PagefileSize) == ""
set PagefileSize = $($)
endif
endif
EndForListDo
ifstr(i) $(PagefilePath) == ""
else-ifstr(i) $(PagefileSize) == ""
else
set PagingFiles = >($(PagingFiles), {$(PagefilePath),$(PagefileSize)})
endif
endif
EndForListDo
set Status = STATUS_SUCCESSFUL
endenumpagefile = +
Return $(Status) $(PagingFiles)
[SetPagingFiles]
set Status = STATUS_FAILED
set PagingFiles = {}
read-syms RegistryConstants
set KeyName = "System\"$(!STF_CONTROLSET)"\Control\Session Manager\Memory Management"
OpenRegKey $(!REG_H_LOCAL) "" $(KeyName) $(MaskAllAccess) KeyHandle
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
goto endsetpagingfiles
endif
set PagefileList = {}
ForListDo $($0)
set PagefileList = >($(PagefileList), *($($), 1)" "*($($), 2) )
EndForListDo
Debug-Output "REGISTRY.INF: New Paging files are "$(PagefileList)
set ValueInfo = {PagingFiles, $(NoTitle), $(!REG_VT_MULTI_SZ), $(PagefileList)}
SetRegValue $(KeyHandle) $(ValueInfo)
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
CloseRegKey $(KeyHandle)
Debug-Output "REGISTRY.INF: Couldn't set paging files value"
goto endsetpagingfiles
endif
CloseRegKey $(KeyHandle)
set Status = STATUS_SUCCESSFUL
endsetpagingfiles = +
Return $(Status)
[MakeQuotaEntries]
set Status = STATUS_FAILED
read-syms RegistryConstants
set PagedPoolSize = $($0)
set RegistrySizeLimit = $($1)
set MBMultiplier = 1024
set-mul MBMultiplier = $(MBMultiplier) 1024
set-mul PagedPoolSize = $(PagedPoolSize) $(MBMultiplier)
set-mul RegistrySizeLimit = $(RegistrySizeLimit) $(MBMultiplier)
set KeyName = "System\"$(!STF_CONTROLSET)"\Control\Session Manager\Memory Management"
OpenRegKey $(!REG_H_LOCAL) "" $(KeyName) $(MaskAllAccess) KeyHandle
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Couldn't open memory management key"
goto end_MakeQuotaEntries
endif
set ValueInfo = {PagedPoolSize, $(NoTitle), $(!REG_VT_DWORD), $(PagedPoolSize)}
SetRegValue $(KeyHandle) $(ValueInfo)
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
CloseRegKey $(KeyHandle)
Debug-Output "REGISTRY.INF: Couldn't set pagepoolsize value"
goto end_MakeQuotaEntries
endif
CloseRegKey $(KeyHandle)
set KeyName = "System\"$(!STF_CONTROLSET)"\Control"
OpenRegKey $(!REG_H_LOCAL) "" $(KeyName) $(MaskAllAccess) KeyHandle
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Couldn't open control key"
goto end_MakeQuotaEntries
endif
set ValueInfo = {RegistrySizeLimit, $(NoTitle), $(!REG_VT_DWORD), $(RegistrySizeLimit)}
SetRegValue $(KeyHandle) $(ValueInfo)
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
CloseRegKey $(KeyHandle)
Debug-Output "REGISTRY.INF: Couldn't set registry size limit value"
goto end_MakeQuotaEntries
endif
CloseRegKey $(KeyHandle)
set Status = STATUS_SUCCESSFUL
end_MakeQuotaEntries = +
Return $(Status)
[MakeWOWEntry]
set Status = STATUS_FAILED
read-syms RegistryConstants
OpenRegKey $(!REG_H_LOCAL) "" "system\"$(!STF_CONTROLSET)"\control\WOW" $(MaskAllAccess) WOWKey
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Failed to open layout key"
goto finish_MakeWOWEntry
endif
set wowcmdline = "ntvdm -m -w -f%SystemRoot%\system32 -a %SystemRoot%\system32\"$($0)
set KeyValues = { +
{wowcmdline, $(NoTitle), $(!REG_VT_EXPAND_SZ), $(wowcmdline)} +
}
shell "" AddValueList $(WOWKey) $(KeyValues)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto finish_MakeWOWEntry
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
goto finish_MakeWOWEntry
endif
CloseRegKey $(WOWKey)
set Status = STATUS_SUCCESSFUL
finish_MakeWOWEntry = +
Return $(Status)
[MakeLayoutEntry]
set Status = STATUS_FAILED
read-syms RegistryConstants
OpenRegKey $(!REG_H_LOCAL) "" "system\"$(!STF_CONTROLSET)"\control\Keyboard Layout" $(MaskAllAccess) LayoutKey
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Failed to open layout key"
goto finish_MakeLayoutEntry
endif
set KeyValues = { +
{$($0), $(NoTitle), $(!REG_VT_SZ), $($1) } +
}
shell "" AddValueList $(LayoutKey) $(KeyValues)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto finish_MakeLayoutEntry
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
goto finish_MakeLayoutEntry
endif
CloseRegKey $(LayoutKey)
LibraryProcedure STATUS, $(!LIBHANDLE), SetCurrentLayout $($0)
ifstr(i) $(STATUS) != "SUCCESS"
Debug-Output "REGISTRY.INF: Failed in SetCurrentLayout function"
goto finish_MakeLayoutEntry
endif
set Status = STATUS_SUCCESSFUL
finish_MakeLayoutEntry = +
Return $(Status)
[MakeLocaleEntry]
set Status = STATUS_FAILED
read-syms RegistryConstants
ifstr(i) $($1) != "locale.nls"
OpenRegKey $(!REG_H_LOCAL) "" "system\"$(!STF_CONTROLSET)"\control\nls\OEMLocale" $(MaskAllAccess) OEMLocaleKey
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Failed to open OEMLocale key"
goto finish_MakeLocaleEntry
endif
set KeyValues = { +
{$($0), $(NoTitle), $(!REG_VT_SZ), $($1)} +
}
shell "" AddValueList $(OEMLocaleKey) $(KeyValues)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "REGISTRY.INF: Failed to find function AddValueList"
goto finish_MakeLocaleEntry
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
Debug-Output "REGISTRY.INF: Failed to create OEMLocale value"
goto finish_MakeLocaleEntry
endif
CloseRegKey $(OEMLocaleKey)
endif
ifstr(i) $(!STF_INSTALL_TYPE) == SETUPBOOTED
set ModifyCPL = YES
else
set ModifyCPL = NO
endif
LibraryProcedure STATUS, $(!LIBHANDLE), SetCurrentLocale $($0) $(ModifyCPL)
ifstr(i) $(STATUS) != "SUCCESS"
ifstr(i) $(STATUS) == ERROR_UNSUPPORTED
set Status = ERROR_UNSUPPORTED
endif
Debug-Output "REGISTRY.INF: Failed in SetCurrentLocale function"
goto finish_MakeLocaleEntry
endif
OpenRegKey $(!REG_H_CUSER) "" "Control Panel\International" $(MaskAllAccess) LocaleKey
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Failed to open cuser international key"
goto finish_MakeLocaleEntry
endif
set KeyValues = { +
{Locale, $(NoTitle), $(!REG_VT_SZ), $($0) } +
}
shell "" AddValueList $(LocaleKey) $(KeyValues)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "REGISTRY.INF: Failed to find function AddValueList"
CloseRegKey $(LocaleKey)
goto finish_MakeLocaleEntry
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
Debug-Output "REGISTRY.INF: Failed to create Current User Locale value"
CloseRegKey $(LocaleKey)
goto finish_MakeLocaleEntry
endif
set KeyValues = {}
set Num = 1
ForListDo $($2)
set KeyValues = >($(KeyValues), {$(Num), $(NoTitle), $(!REG_VT_SZ), $($)})
EndForListDo
set KeyPath = {{"Sorting Order", $(NoTitle), $(MaskAllAccess)}}
shell "" CreateKey $(LocaleKey) $(KeyPath) $(KeyValues)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
CloseRegKey $(LocaleKey)
goto finish_MakeLocaleEntry
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
CloseRegKey $(LocaleKey)
goto finish_MakeLocaleEntry
else
CloseRegKey $($R1)
endif
CloseRegKey $(LocaleKey)
set Status = STATUS_SUCCESSFUL
finish_MakeLocaleEntry = +
Return $(Status)
[MakeLanguageEntry]
set Status = STATUS_FAILED
read-syms RegistryConstants
OpenRegKey $(!REG_H_LOCAL) "" "system\"$(!STF_CONTROLSET)"\control\nls\Language" $(MaskAllAccess) LanguageKey
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Failed to open Language key"
goto finish_MakeLanguageEntry
endif
set KeyValues = { +
{Default, $(NoTitle), $(!REG_VT_SZ), $($0) }, +
{$($0), $(NoTitle), $(!REG_VT_SZ), $($1) } +
}
shell "" AddValueList $(LanguageKey) $(KeyValues)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto finish_MakeLanguageEntry
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
goto finish_MakeLanguageEntry
endif
CloseRegKey $(LanguageKey)
set Status = STATUS_SUCCESSFUL
finish_MakeLanguageEntry = +
Return $(Status)
[MakeCodePageEntry]
set Status = STATUS_FAILED
read-syms RegistryConstants
OpenRegKey $(!REG_H_LOCAL) "" "system\"$(!STF_CONTROLSET)"\control\nls\CodePage" $(MaskAllAccess) CodePageKey
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Failed to open CodePage key"
goto finish_MakeCodePageEntry
endif
set KeyValues = { +
{ACP, $(NoTitle), $(!REG_VT_SZ), $($0) }, +
{OEMCP, $(NoTitle), $(!REG_VT_SZ), $($2) }, +
{MACCP, $(NoTitle), $(!REG_VT_SZ), $($4) }, +
{$($0), $(NoTitle), $(!REG_VT_SZ), $($1) }, +
{$($2), $(NoTitle), $(!REG_VT_SZ), $($3) }, +
{$($4), $(NoTitle), $(!REG_VT_SZ), $($5) }, +
{OEMHAL,$(NoTitle), $(!REG_VT_SZ), $($8) } +
}
ForListDo $($6)
set CodePageValue = {$($), $(NoTitle), $(!REG_VT_SZ), *($($7), $(#)) }
set KeyValues = >($(KeyValues), $(CodePageValue))
EndForListDo
shell "" AddValueList $(CodePageKey) $(KeyValues)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto finish_MakeCodePageEntry
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
goto finish_MakeCodePageEntry
endif
CloseRegKey $(CodePageKey)
set Status = STATUS_SUCCESSFUL
finish_MakeCodePageEntry = +
Return $(Status)
[MakeFontEntries]
set Status = STATUS_FAILED
read-syms RegistryConstants
set OemFontFile = $($0)
set WoaFontFile = $($1)
set Cga40FontFile = $($2)
set Cga80FontFile = $($3)
set Ega40FontFile = $($4)
set Ega80FontFile = $($5)
set FixFontFile = $($6)
set SysFontFile = $($7)
set MSShellDlgFontFile = $($8)
set DlgFontFileNameFile = $($9)
set TaggedFontName = $($10)
set CourFontFile = $($11)
set SerifFontFile = $($12)
set SmallFontFile = $($13)
install Install-Ini-Font-Alter
ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
goto finish_MakeFontEntries
endif
set Status = STATUS_SUCCESSFUL
finish_MakeFontEntries = +
Return $(Status)
[Install-Ini-Font-Alter]
ReplaceIniKeyValue "win.ini", GRE_Initialize, "OEMFONT.FON", $(OemFontFile)
ReplaceIniKeyValue "system.ini", boot.description, "oemfonts.fon", $(OemFontFile)
ReplaceIniKeyValue "system.ini", 386Enh, "woafont", $(WoaFontFile)
ReplaceIniKeyValue "system.ini", 386Enh, "CGA40WOA.FON", $(Cga40FontFile)
ReplaceIniKeyValue "system.ini", 386Enh, "CGA80WOA.FON", $(Cga80FontFile)
ReplaceIniKeyValue "system.ini", 386Enh, "EGA40WOA.FON", $(Ega40FontFile)
ReplaceIniKeyValue "system.ini", 386Enh, "EGA80WOA.FON", $(Ega80FontFile)
ReplaceIniKeyValue "win.ini", GRE_Initialize, "FIXEDFON.FON", $(FixFontFile)
ReplaceIniKeyValue "win.ini", GRE_Initialize, "FONTS.FON", $(SysFontFile)
ReplaceIniKeyValue "win.ini", FontSubstitutes, "MS Shell Dlg", $(MSShellDlgFontFile)
ReplaceIniKeyValue "win.ini", Fonts, "MS Sans Serif 8,10,12,14,18,24 (VGA res)", $(DlgFontFileNameFile)
ReplaceIniKeyValue "win.ini", Fonts, "Courier 10,12,15 (VGA res)", $(CourFontFile)
ReplaceIniKeyValue "win.ini", Fonts, "MS Serif 8,10,12,14,18,24 (VGA res)", $(SerifFontFile)
ReplaceIniKeyValue "win.ini", Fonts, "Small Fonts (VGA res)", $(SmallFontFile)
ifstr(i) $(TaggedFontName) == ""
RemoveIniKey "win.ini", FontSubstitutes, "Arial TRK"
RemoveIniKey "win.ini", FontSubstitutes, "Courier New TRK"
RemoveIniKey "win.ini", FontSubstitutes, "Times New Roman TRK"
RemoveIniKey "win.ini", FontSubstitutes, "Arial CE"
RemoveIniKey "win.ini", FontSubstitutes, "Courier New CE"
RemoveIniKey "win.ini", FontSubstitutes, "Times New Roman CE"
RemoveIniKey "win.ini", FontSubstitutes, "Arial CYR"
RemoveIniKey "win.ini", FontSubstitutes, "Courier New CYR"
RemoveIniKey "win.ini", FontSubstitutes, "Times New Roman CYR"
RemoveIniKey "win.ini", FontSubstitutes, "Arial Greek"
RemoveIniKey "win.ini", FontSubstitutes, "Courier New Greek"
RemoveIniKey "win.ini", FontSubstitutes, "Times New Roman Greek"
endif
ifstr(i) $(TaggedFontName) == "CE"
ReplaceIniKeyValue "win.ini" FontSubstitutes, "Arial CE", "Arial"
ReplaceIniKeyValue "win.ini" FontSubstitutes, "Courier New CE", "Courier New"
ReplaceIniKeyValue "win.ini" FontSubstitutes, "Times New Roman CE", "Times New Roman"
ReplaceIniKeyValue "win.ini" FontSubstitutes, "Arial CYR", "Arial"
ReplaceIniKeyValue "win.ini" FontSubstitutes, "Courier New CYR", "Courier New"
ReplaceIniKeyValue "win.ini" FontSubstitutes, "Times New Roman CYR", "Times New Roman"
endif
ifstr(i) $(TaggedFontName) == "CYR"
ReplaceIniKeyValue "win.ini" FontSubstitutes, "Arial CYR", "Arial"
ReplaceIniKeyValue "win.ini" FontSubstitutes, "Courier New CYR", "Courier New"
ReplaceIniKeyValue "win.ini" FontSubstitutes, "Times New Roman CYR", "Times New Roman"
ReplaceIniKeyValue "win.ini" FontSubstitutes, "Arial CE", "Arial"
ReplaceIniKeyValue "win.ini" FontSubstitutes, "Courier New CE", "Courier New"
ReplaceIniKeyValue "win.ini" FontSubstitutes, "Times New Roman CE", "Times New Roman"
endif
ifstr(i) $(TaggedFontName) == "Greek"
ReplaceIniKeyValue "win.ini" FontSubstitutes, "Arial Greek", "Arial"
ReplaceIniKeyValue "win.ini" FontSubstitutes, "Courier New Greek", "Courier New"
ReplaceIniKeyValue "win.ini" FontSubstitutes, "Times New Roman Greek", "Times New Roman"
endif
ifstr(i) $(TaggedFontName) == "TRK"
ReplaceIniKeyValue "win.ini" FontSubstitutes, "Arial TRK", "Arial"
ReplaceIniKeyValue "win.ini" FontSubstitutes, "Courier New TRK", "Courier New"
ReplaceIniKeyValue "win.ini" FontSubstitutes, "Times New Roman TRK", "Times New Roman"
endif
exit
; fujino 960226
; [MakeServicesEntry]
[MakeServicesEntry2]
set Status = STATUS_FAILED
read-syms RegistryConstants
Debug-Output "REGISTRY.INF: Creating Services node: "$($0)
OpenRegKey $(!REG_H_LOCAL) "" "system\"$(!STF_CONTROLSET)"\services" $(MaskAllAccess) ServicesKey
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Failed to open services key"
goto finish_MakeServicesEntry
endif
set StandardSet = { Type, +
Start, +
ErrorControl, +
Group, +
Dependencies, +
StartName, +
Password, +
BinaryPathName, +
DisplayName +
}
ForListDo $(StandardSet)
set $($) = ""
EndForListDo
set KeyValues = {}
ForListDo $($1)
set Var = *($($), 1)
set Value = *($($), 4)
ifcontains(i) $(Var) in $(StandardSet)
set $(Var) = $(Value)
else
set KeyValues = >($(KeyValues), $($))
endif
EndForListDo
set Error = NO
ForListDo { Type, Start, ErrorControl, BinaryPathName }
ifstr(i) $($($)) == ""
set Error = YES
endif
EndForListDo
ifstr(i) $(Error) == YES
Debug-Output "REGISTRY.INF: MakeServicesEntry was not passed in one of the three values: Type, Start, ErrorControl"
CloseRegKey $(ServicesKey)
goto finish_MakeServicesEntry
endif
set ServiceName = $($0)
LibraryProcedure STATUS, $(!LIBHANDLE), SetupCreateService $(ServiceName) +
$(DisplayName) +
$(Type) +
$(Start) +
$(ErrorControl) +
$(BinaryPathName) +
$(Group) +
$(Dependencies) +
$(StartName) +
$(Password)
ifstr(i) $(STATUS) != "SUCCESS"
Debug-Output "REGISTRY.INF: MakeServicesEntry: SetupCreateService function failed"
CloseRegKey $(ServicesKey)
goto finish_MakeServicesEntry
endif
set KeyPath = {{$($0), $(NoTitle), $(MaskAllAccess)}}
shell "" CreateKey $(ServicesKey) $(KeyPath) $(KeyValues)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "REGISTRY.INF: Failed to shell CreateKey."
CloseRegKey $(ServicesKey)
goto error_MakeServicesEntry
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
Debug-Output "REGISTRY.INF: Failed to create services node."
CloseRegKey $(ServicesKey)
goto error_MakeServicesEntry
endif
set MiniportKey = $($R1)
ifstr(i) $($2) != ""
set KeyPath = {{$($5), $(NoTitle), $(MaskAllAccess)}}
set KeyValues = $($2)
shell "" CreateKey $(MiniportKey) $(KeyPath) $(KeyValues)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
CloseRegKey $(ServicesKey)
CloseRegKey $(MiniportKey)
goto error_MakeServicesEntry
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
CloseRegKey $(ServicesKey)
CloseRegKey $(MiniportKey)
goto error_MakeServicesEntry
endif
set ParametersKey = $($R1)
ForListDo $($3)
set-sub DeviceNum = $(#) 1
;fujino 960226
; set EntryName = "Device"$(DeviceNum)
set EntryName = $($6)
set KeyPath = {{$(EntryName), $(NoTitle), $(MaskAllAccess)}}
set KeyValues = $($3)
shell "" CreateKey $(ParametersKey) $(KeyPath) $(KeyValues)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
CloseRegKey $(ServicesKey)
CloseRegKey $(MiniportKey)
CloseRegKey $(ParametersKey)
goto error_MakeServicesEntry
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
CloseRegKey $(ServicesKey)
CloseRegKey $(MiniportKey)
CloseRegKey $(ParametersKey)
goto error_MakeServicesEntry
endif
CloseRegKey $($R1)
EndForListDo
CloseRegKey $(ParametersKey)
endif
CloseRegKey $(MiniportKey)
ifstr(i) $($4) != {}
OpenRegKey $(ServicesKey) "" "eventlog\system" $(MaskAllAccess) EventLogKey
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Failed to open eventlog key"
CloseRegKey $(ServicesKey)
goto error_MakeServicesEntry
endif
set KeyPath = {{$($0), $(NoTitle), $(MaskAllAccess)}}
set KeyValues = $($4)
shell "" CreateKey $(EventLogKey) $(KeyPath) $(KeyValues)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
CloseRegKey $(ServicesKey)
CloseRegKey $(EventLogKey)
goto error_MakeServicesEntry
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
CloseRegKey $(ServicesKey)
CloseRegKey $(EventLogKey)
goto error_MakeServicesEntry
endif
CloseRegKey $($R1)
CloseRegKey $(EventLogKey)
endif
CloseRegKey $(ServicesKey)
set Status = STATUS_SUCCESSFUL
goto finish_MakeServicesEntry
error_MakeServicesEntry = +
shell "" ModifyServicesEntry $($0) $(!SERVICE_DISABLED)
finish_MakeServicesEntry = +
Return $(Status)
[GetServicesEntryStart]
set Status = STATUS_FAILED
set StartValue = ""
read-syms RegistryConstants
Debug-Output "REGISTRY.INF: Get Services node Start value: "$($0)
set KeyName = "system\"$(!STF_CONTROLSET)"\services\"$($0)
OpenRegKey $(!REG_H_LOCAL) "" $(KeyName) $(!REG_KEY_READ) KeyHandle
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Couldn't open services node for read access"
goto finish_GetServicesEntryStart
endif
GetRegValue $(KeyHandle) "Start" StartValueList
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Couldn't read Start value"
CloseRegKey $(KeyHandle)
goto finish_GetServicesEntryStart
endif
CloseRegKey $(KeyHandle)
set StartValue = *($(StartValueList), 4)
set Status = STATUS_SUCCESSFUL
finish_GetServicesEntryStart = +
Return $(Status) $(StartValue)
[RemoveServicesEntry]
set Status = STATUS_FAILED
read-syms RegistryConstants
Debug-Output "REGISTRY.INF: Removing Services node: "$($0)
shell "" ModifyServicesEntry $($0) $(!SERVICE_DISABLED)
Return $($R0)
[MakeSetupKey]
set Status = STATUS_FAILED
read-syms RegistryConstants
OpenRegKey $(!REG_H_LOCAL) "" "system\"$(!STF_CONTROLSET)"\control" $(MaskAllAccess) ControlKey
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Failed to open services key"
goto finish_MakeSetupKey
endif
set KeyPath = { +
{"Setup", $(NoTitle), $(MaskAllAccess)} +
}
set KeyValues = {}
shell "" CreateKey $(ControlKey) $(KeyPath) $(KeyValues)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
CloseRegKey $(ControlKey)
goto finish_MakeSetupKey
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
CloseRegKey $(ControlKey)
goto finish_MakeSetupKey
endif
CloseRegKey $($R1)
CloseRegKey $(ControlKey)
set Status = STATUS_SUCCESSFUL
finish_MakeSetupKey = +
Return $(Status)
[CheckSetupModify]
set Status = STATUS_FAILED
read-syms RegistryConstants
LibraryProcedure STATUS, $(!LIBHANDLE), TestAdmin
ifstr(i) $(STATUS) == "YES"
set Status = STATUS_SUCCESSFUL
endif
Return $(Status)
[MakeSetupOptionEntry]
set Status = STATUS_FAILED
read-syms RegistryConstants
OpenRegKey $(!REG_H_LOCAL) "" "system\"$(!STF_CONTROLSET)"\control" $(MaskAllAccess) ControlKey
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Failed to open services key"
goto finish_MakeSetupOptionEntry
endif
set KeyPath = { +
{"Setup", $(NoTitle), $(MaskAllAccess)} +
}
set KeyValues = { +
{$($0), $(NoTitle), $(!REG_VT_SZ), $($1)} +
}
shell "" CreateKey $(ControlKey) $(KeyPath) $(KeyValues)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
CloseRegKey $(ControlKey)
goto finish_MakeSetupOptionEntry
endif
ifstr(i) $($R0) != STATUS_SUCCESSFUL
CloseRegKey $(ControlKey)
goto finish_MakeSetupOptionEntry
endif
CloseRegKey $($R1)
CloseRegKey $(ControlKey)
set Status = STATUS_SUCCESSFUL
finish_MakeSetupOptionEntry = +
Return $(Status)
[ResetSetupProgressValue]
set Status = STATUS_FAILED
read-syms RegistryConstants
OpenRegKey $(!REG_H_LOCAL) "" "system\setup" $(MaskAllAccess) SetupKey
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Failed to open Setup key"
goto finish_ResetSetupProgressValue
endif
set ValueInfo = {SystemSetupInProgress, $(NoTitle), $(!REG_VT_DWORD), 0}
SetRegValue $(SetupKey) $(ValueInfo)
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
CloseRegKey $(SetupKey)
Debug-Output "REGISTRY.INF: Couldn't set SystemSetupInProgress value"
goto finish_ResetSetupProgressValue
endif
ifstr(i) $(!STF_NTUPGRADE) == "YES"
set ValueInfo = {UpgradeInProgress, $(NoTitle), $(!REG_VT_DWORD), 0}
SetRegValue $(SetupKey) $(ValueInfo)
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
CloseRegKey $(SetupKey)
Debug-Output "REGISTRY.INF: Couldn't set UpgradeInProgress value"
goto finish_ResetSetupProgressValue
endif
endif
CloseRegKey $(SetupKey)
set Status = STATUS_SUCCESSFUL
finish_ResetSetupProgressValue = +
Return $(Status)
[ModifyServicesEntry]
read-syms RegistryConstants
set Status = STATUS_FAILED
set StartValue = $($1)
LibraryProcedure STATUS, $(!LIBHANDLE), SetupChangeServiceStart $($0) $(StartValue)
ifstr(i) $(STATUS) != "SUCCESS"
Debug-Output "REGISTRY.INF: ModifyServicesEntry: SetupChangeServiceStart function failed"
goto finish_ModifyServicesEntry
endif
set Status = STATUS_SUCCESSFUL
finish_ModifyServicesEntry = +
Return $(Status)
[CreateKey]
set Status = STATUS_FAILED
read-syms RegistryConstants
set BaseHandle = $($0)
set KeyHandle = $(BaseHandle)
ForListDo $($1)
set KeyInfo = $($)
set KeyName = *($(KeyInfo), 1)
OpenRegKey $(BaseHandle) "" $(KeyName) $(MaskAllAccess) KeyHandle
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Key"$(KeyName)"doesn't exist. Will create key"
set RegLastError = 0
CreateRegKey $(BaseHandle) $(KeyInfo) "" $(MaskAllAccess) "" KeyHandle
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
set Status = STATUS_ERROR_CREATEKEY
Debug-Output "REGISTRY.INF: Error in creating key"
goto endcreate
endif
endif
ifstr(i) $(BaseHandle) != $($0)
CloseRegKey $(BaseHandle)
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
set Status = STATUS_ERROR_CREATEKEY
Debug-Output "REGISTRY.INF: Error in closing base handle"
goto endcreate
endif
endif
set BaseHandle = $(KeyHandle)
EndForListDo
ifstr(i) $($2) != {}
shell "" AddValueList $(KeyHandle) $($2)
ifstr(i) $($R0) != STATUS_SUCCESSFUL
set Status = STATUS_ERROR_CREATEVALUE
goto endcreate
endif
endif
set Status = STATUS_SUCCESSFUL
endcreate = +
ifstr(i) $(Status) != STATUS_SUCCESSFUL
Debug-Output "REGISTRY.INF: CreateKey Error:"$(Status)
endif
Return $(Status) $(KeyHandle)
[AddValueList]
set Status = STATUS_FAILED
read-syms RegistryConstants
ForListDo $($1)
SetRegValue $($0) $($)
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: CreateValue failed:"$($)
goto end_addvaluelist
endif
EndForListDo
set Status = STATUS_SUCCESSFUL
end_addvaluelist = +
return $(Status)
[EnableCrashDump]
OpenRegKey $(!REG_H_LOCAL) "" system\currentcontrolset\control\CrashControl $(!REG_KEY_SET_VALUE) CrashControlKey
ifstr $(CrashControlKey) != ""
shell "" AddValueList $(CrashControlKey) {{LogEvent ,0,$(!REG_VT_DWORD),1},+
{SendAlert ,0,$(!REG_VT_DWORD),1},+
{CrashDumpEnabled,0,$(!REG_VT_DWORD),1},+
{AutoReboot ,0,$(!REG_VT_DWORD),1}}
CloseRegKey $(CrashControlKey)
endif
return
[FixQuotaEntries]
set Status = STATUS_SUCCESSFUL
read-syms RegistryConstants
set OldPagedPoolSize = 0
set OldRegistrySizeLimit = 0
set NewPagedPoolSize = 0
set NewRegistrySizeLimit = 0
set BogusPagedPoolSize = 48
set BogusRegistrySizeLimit = 24
set MBMultiplier = 1024
set-mul MBMultiplier = $(MBMultiplier) 1024
set-mul BogusPagedPoolSize = $(BogusPagedPoolSize) $(MBMultiplier)
set-mul BogusRegistrySizeLimit = $(BogusRegistrySizeLimit) $(MBMultiplier)
set KeyName = "System\"$(!STF_CONTROLSET)"\Control\Session Manager\Memory Management"
OpenRegKey $(!REG_H_LOCAL) "" $(KeyName) $(MaskAllAccess) KeyHandle
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Couldn't open memory management key"
set Status = STATUS_FAILED
goto fix_next_entry
endif
GetRegValue $(KeyHandle) "PagedPoolSize" OldPagedPoolSizeInfo
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Couldn't read PagedPoolSize value"
set Status = STATUS_FAILED
goto close_first_handle
endif
set OldPagedPoolSize = *($(OldPagedPoolSizeInfo), 4)
ifint $(OldPagedPoolSize) == $(BogusPagedPoolSize)
set ValueInfo = {PagedPoolSize, $(NoTitle), $(!REG_VT_DWORD), $(NewPagedPoolSize)}
SetRegValue $(KeyHandle) $(ValueInfo)
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
set Status = STATUS_FAILED
Debug-Output "REGISTRY.INF: Couldn't set PagePoolSize value"
endif
endif
close_first_handle = +
CloseRegKey $(KeyHandle)
fix_next_entry = +
set KeyName = "System\"$(!STF_CONTROLSET)"\Control"
OpenRegKey $(!REG_H_LOCAL) "" $(KeyName) $(MaskAllAccess) KeyHandle
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
set Status = STATUS_FAILED
Debug-Output "REGISTRY.INF: Couldn't open control key"
goto end_FixQuotaEntries
endif
GetRegValue $(KeyHandle) "RegistrySizeLimit" OldRegistrySizeLimitInfo
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
Debug-Output "REGISTRY.INF: Couldn't read RegistrySizeLimit value"
set Status = STATUS_FAILED
goto close_second_handle
endif
set OldRegistrySizeLimit = *($(OldRegistrySizeLimitInfo), 4)
ifint $(OldRegistrySizeLimit) == $(BogusRegistrySizeLimit)
set ValueInfo = {RegistrySizeLimit, $(NoTitle), $(!REG_VT_DWORD), $(RegistrySizeLimit)}
SetRegValue $(KeyHandle) $(ValueInfo)
ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
set Status = STATUS_FAILED
Debug-Output "REGISTRY.INF: Couldn't set RegistrySizeLimit value"
endif
endif
close_second_handle = +
CloseRegKey $(KeyHandle)
end_FixQuotaEntries = +
Return $(Status)
;; end registry.inf
;**************************************************************************
; PROGRESS GUAGE VARIABLES
;**************************************************************************
[ProgressCopyENG]
ProCaption = "Windows NT セットアップ"
ProCancel = "キャンセル"
ProCancelMsg = "Windows NT は正しく組み込まれていません。"+
"ファイルのコピーを中止しますか?"
ProCancelCap = "セットアップ メッセージ"
ProText1 = "コピー元:"
ProText2 = "コピー先:"
[StringsENG]
String1 = "RSA-98シリーズ"
String2 = "RSAー98シリーズ ファイルへのドライブ名からのフルパスを入力してください。"+
; "セットアップ フロッピー ディスクからファイルを組み込む場合は、"+
; "ドライブ名 (A: など) を入力してください。"+
; "セットアップは適切なディスクを挿入するよう指示します。"+
"これらの操作が終わったら[続行]を選んでください。"
; String3 = "シリアルポート(2チャンネル)を削除すると、システムは"+
; "使用不可になる可能性があります。削除してもよろしいですか?"
[Source Media Descriptions]
;; 1 = "PC-9800 シリアルポート(2チャンネル) Controller Drivers Disk 1 of 1" , TAGFILE = disk1
; 1 = "アイ・オー・データ 高速シリアルボード RSA-98シリーズ サポートソフトウェアディスク" , TAGFILE = disk1
1 = "アイ・オー・データ 高速シリアルボード RSA-98シリーズ サポートソフトウェアディスク"
[Files-RsDrivers]
;;SerRSA98 = 1,SerRSA98.sys , SIZE=999
SerRSA98 = 1,SerRSA98.sys , SIZE=999