You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.7 KiB
Plaintext

'Korrektur der Defaultwerte beim C6140 XPe
Option Explicit
Dim wshshell,fso,i,Fnct
Dim strPath,strSystemFolder,strWinFolder,strTempFolder
'----------------------------- Objekte erzeugen --------------------------------
i = 0
On Error Resume Next
Do
err.Clear
i = i+1
Set wshshell = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
Set Fnct = CreateObject("Install.Functions")
WScript.Sleep 1000
Loop Until Err.Number = 0 OR i > 30
If Err.Number <> 0 Then
WScript.Quit
End If
On Error Goto 0
'--------------------------- Standardpfade -------------------------------------
strPath = GetCurrentPath()
strSystemFolder = fso.GetSpecialFolder(1) & "\"
strWinFolder = fso.GetSpecialFolder(0) & "\"
strTempFolder = fso.GetSpecialFolder(2) & "\"
'------------------------------ Main -------------------------------------------
Dim strMainVolume
Dim strComputerIni
strMainVolume = ExpandPath("%MAIN_VOLUME%","c:\")
strComputerIni = strMainVolume & "Computer.ini"
Dim strComputerType
strComputerType = Fnct.GetIniString("CD1_Setup","ComputerType",strComputerIni)
'Nur bei diesem Computertyp
If strComputerType = "CP6140 Spec2003 XPe/SP2" Then
Dim strFockeToolsFolder
Dim strMbProbeFolder
Dim strMbProbeStdFileName
strFockeToolsFolder = ExpandPath("%FOCKETOOLSDIR%","C:\FockeTools") & "\"
strMbProbeFolder = strFockeToolsFolder & "MbProbe\"
strMbProbeStdFileName = strMbProbeFolder & "MbProbeHistoryLog.std"
If fso.FileExists(strMbProbeStdFileName) Then
'Datei lesen
Dim MbProbeStdFile
Dim strMbProbeStdFile
Set MbProbeStdFile = fso.OpenTextFile(strMbProbeStdFileName)
strMbProbeStdFile = MbProbeStdFile.ReadAll()
MbProbeStdFile.Close
'und anschlie<69>end l<>schen
Call fso.DeleteFile(strMbProbeStdFileName,True)
'danach den gelesenen Text korrigieren
strMbProbeStdFile = Replace(strMbProbeStdFile,"1.30","1.54")
strMbProbeStdFile = Replace(strMbProbeStdFile,"1.50","1.73")
strMbProbeStdFile = Replace(strMbProbeStdFile,"2.50","3.30")
'und wieder wegschreiben
Set MbProbeStdFile = fso.OpenTextFile(strMbProbeStdFileName,2,True,0)
Call MbProbeStdFile.Write(strMbProbeStdFile)
MbProbeStdFile.Close
End if
End If
'------------------------------- Funktionen ------------------------------------
Function GetCurrentPath()
Dim l_strScriptName
Dim l_strTemp
l_strScriptName = WScript.ScriptFullName
l_strTemp = WScript.ScriptName
GetCurrentPath = Left(l_strScriptName, Len(l_strScriptName) - Len(l_strTemp))
End Function
Function ExpandPath(p_strEnvironment,p_strDefault)
Dim l_strTemp
l_strTemp = wshshell.ExpandEnvironmentStrings(p_strEnvironment)
If l_strTemp = p_strEnvironment Then
l_strTemp = p_strDefault
End If
ExpandPath = l_strTemp
End Function