Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub FixIrisIni()
- 'Old
- 'SERVICE5=OPOS Line Display,c:\iris\bin\OPOSLineDisplaye.exe disp1
- 'new
- 'SERVICE5=OPOS Line Display,c:\iris\bin\OCS.exe disp1
- DispThis(" FixIrisIni Started" & NewLine)
- Dim IrisIni As New PrivateIniFile
- Dim tmpServiceCount As Integer
- Dim FirstDrive As Boolean
- Dim DispServiceObject As String
- FirstDrive = True
- For xLoop_Register As Integer = 0 To PosMaint.RegisterInformations.Count - 1
- Dim RegInfo As RegInfo = PosMaint.RegisterInformations(xLoop_Register)
- DispServiceObject = "disp" & RegInfo.RegisterNumber.ToString
- DispThis(" On Register " & RegInfo.RegisterNumber.ToString & NewLine)
- IrisIni.SetFileName("c:\iris\reginfo\Reg" & RegInfo.RegisterNumber.ToString & "\ini\iris.ini")
- DispThis(" Delete all services" & NewLine)
- For xLoop_Service As Integer = 1 To 20
- IrisIni.DeleteKey("POSShell", "SERVICE" & xLoop_Service.ToString)
- Next
- tmpServiceCount = 0
- If RegInfo.ScannerType = eScannerType.PSC Then
- tmpServiceCount += 1
- DispThis(" Adding Service " & tmpServiceCount & " Scanner " & RegInfo.ScannerServiceObjectName & NewLine)
- IrisIni.WriteString("POSShell", "SERVICE" & tmpServiceCount.ToString, "OPOS Scanner " & RegInfo.ScannerServiceObjectName & ",c:\iris\bin\OPOSScanner.exe " & RegInfo.ScannerServiceObjectName)
- tmpServiceCount += 1
- DispThis(" Adding Service " & tmpServiceCount & " OPOS Scale " & RegInfo.ScaleServiceObjectName & NewLine)
- IrisIni.WriteString("POSShell", "SERVICE" & tmpServiceCount.ToString, "OPOS Scale " & RegInfo.ScaleServiceObjectName & " [P],c:\iris\bin\OPOSScale.exe " & RegInfo.ScaleServiceObjectName)
- End If
- If PosMaint.PrtExpoNumberRegNum = RegInfo.RegisterNumber Then
- tmpServiceCount += 1
- DispThis(" Adding Service " & tmpServiceCount & " prtrdev.exe grill1 " & NewLine)
- IrisIni.WriteString("POSShell", "SERVICE" & tmpServiceCount.ToString, "Chit Printer,c:\iris\bin\prtrdev.exe grill1")
- End If
- tmpServiceCount += 1
- DispThis(" Adding Service " & tmpServiceCount & " Pserve.exe " & NewLine)
- IrisIni.WriteString("POSShell", "SERVICE" & tmpServiceCount.ToString, "Print Server,c:\iris\bin\Pserve.exe")
- If RegInfo.RegisterNumber = CIntNull(RegInfo.PrimaryPrinter) Then
- tmpServiceCount += 1
- DispThis(" Adding Service " & tmpServiceCount & " prtrdev.exe rcpt" & RegInfo.PrimaryPrinter & NewLine)
- IrisIni.WriteString("POSShell", "SERVICE" & tmpServiceCount.ToString, "Print Device,c:\iris\bin\prtrdev.exe rcpt" & RegInfo.PrimaryPrinter)
- End If
- tmpServiceCount += 1
- DispThis(" Adding Service " & tmpServiceCount & " timesrv.exe " & NewLine)
- IrisIni.WriteString("POSShell", "SERVICE" & tmpServiceCount.ToString, "Time Server,c:\iris\bin\timesrv.exe")
- If Not RegInfo.IsDrive Then
- tmpServiceCount += 1
- DispThis(" Adding Service " & tmpServiceCount & " OCS.exe " & DispServiceObject & NewLine)
- IrisIni.WriteString("POSShell", "SERVICE" & tmpServiceCount.ToString, "OPOS Line Display,c:\iris\bin\OCS.exe " & DispServiceObject)
- End If
- '============= OPOS MSR STUFF ================
- If RegInfo.HardwareType = eHardwareType.Panasonic Then
- tmpServiceCount += 1
- DispThis(" Adding Service " & tmpServiceCount & " OPOSMsr.exe -msr1 msr" & RegInfo.RegisterNumber & NewLine)
- IrisIni.WriteString("POSShell", "SERVICE" & tmpServiceCount.ToString, "OPOS MSR,c:\iris\bin\OPOSMsr.exe -msr1 PanMSR" & RegInfo.RegisterNumber)
- ElseIf RegInfo.HardwareType = eHardwareType.Par7700 Then
- tmpServiceCount += 1
- DispThis(" Adding Service " & tmpServiceCount & " OPOSMsr.exe -msr1 msr" & RegInfo.RegisterNumber & NewLine)
- IrisIni.WriteString("POSShell", "SERVICE" & tmpServiceCount.ToString, "OPOS MSR,c:\iris\bin\OPOSMsr.exe -msr1 msr" & RegInfo.RegisterNumber)
- ElseIf RegInfo.HardwareType = eHardwareType.TCx800 Then
- tmpServiceCount += 1
- DispThis(" Adding Service " & tmpServiceCount & " OPOSMsr.exe -msr1 msr" & RegInfo.RegisterNumber & NewLine)
- IrisIni.WriteString("POSShell", "SERVICE" & tmpServiceCount.ToString, "OPOS MSR,c:\iris\bin\OPOSMsr.exe -msr1 TCxMSR" & RegInfo.RegisterNumber)
- End If
- '=======================================================
- ''============= Run Watch for CPU Spike ================
- 'If IO.File.Exists("c:\recovery\bin\Find100PercentCPU.flg") Then
- ' tmpServiceCount += 1
- ' IrisIni.WriteString("POSShell", "SERVICE" & tmpServiceCount.ToString, "Find100PercentCPU,C:\iris\bin\Find100PercentCPU.exe")
- 'End If
- '============= Kitchen Redundant only reg 2================
- If PosMaint.RedundantKitchen And RegInfo.RegisterNumber = 2 Then
- tmpServiceCount += 1
- DispThis(" Adding Service " & tmpServiceCount & " Redundant Kitchen" & NewLine)
- IrisIni.WriteString("POSShell", "SERVICE" & tmpServiceCount.ToString, "Redundant Kitchen,C:\iris\bin\Kitchen.exe")
- End If
- '============================================
- '************************************************************
- 'Paul E. 7/12/2018
- 'The outside display (OCB) for Dual lane 1 will use the current POSMaintGUI "Out Side Dispaly Reg" register number
- 'Dual Lane 2 will be the configured Dual Lane 2 register
- If (RegInfo.DefaultConcept = eDefaultConcept.SplitScreen OrElse RegInfo.DefaultConcept = eDefaultConcept.DualLane1) Then
- If PosMaint.OutSideDisplay1 = eOutSideDisplayType.SicomDigitalDisplay Or PosMaint.OutSideDisplay1 = eOutSideDisplayType.SicomOCU Then
- tmpServiceCount += 1
- DispThis(" Adding Service " & tmpServiceCount & " OCS.exe OCBDisp1" & NewLine)
- IrisIni.WriteString("POSShell", "SERVICE" & tmpServiceCount.ToString, "Sicom OCU 1,c:\iris\bin\OCS.exe OCBDisp1")
- ElseIf PosMaint.OutSideDisplay1 = eOutSideDisplayType.AccuviewNG Then
- tmpServiceCount += 1
- DispThis(" Adding Service " & tmpServiceCount & " tddisp.exe OCBDisp1" & NewLine)
- IrisIni.WriteString("POSShell", "SERVICE" & tmpServiceCount.ToString, "Out Side Display,c:\iris\bin\tddisp.exe OCBDisp1")
- End If
- End If
- If RegInfo.DefaultConcept = eDefaultConcept.DualLane2 Then
- If PosMaint.OutSideDisplay2 = eOutSideDisplayType.SicomDigitalDisplay Or PosMaint.OutSideDisplay2 = eOutSideDisplayType.SicomOCU Then
- tmpServiceCount += 1
- DispThis(" Adding Service " & tmpServiceCount & " OCS.exe OCBDisp2" & NewLine)
- IrisIni.WriteString("POSShell", "SERVICE" & tmpServiceCount.ToString, "Sicom OCU 2,c:\iris\bin\OCS.exe OCBDisp2")
- ElseIf PosMaint.OutSideDisplay2 = eOutSideDisplayType.AccuviewNG Then
- tmpServiceCount += 1
- DispThis(" Adding Service " & tmpServiceCount & " tddisp.exe OCBDisp2" & NewLine)
- IrisIni.WriteString("POSShell", "SERVICE" & tmpServiceCount.ToString, "Out Side Display,c:\iris\bin\tddisp.exe OCBDisp2")
- End If
- End If
- '************************************************************
- DispThis(" Service Count of " & tmpServiceCount & NewLine)
- IrisIni.WriteInteger("POSShell", "SERVICE_COUNT", tmpServiceCount)
- Sleep(10)
- DispThis(" Finish Register " & xLoop_Register & NewLine)
- Next
- IrisIni = Nothing
- DispThis(" FixIrisIni Finish" & NewLine)
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement