cancel
Showing results for 
Search instead for 
Did you mean: 

Avoid closing Back ground window in sap customer checkout

NithinM
Explorer

Dear Experts,

In SAP Customer Checkout Point of sale application, we all know there is a background window which will open while we run the application. Also, we know this window is mandatory to be running to perform the operations from the front end webpage interface.

Users are closing this window unknowingly while the application is open in the front end web page which is resulting in errors from the frontend web page. Here the requirement is, Is there any provision to restrict the users to close this background window while the application is open in the front end web page?

Thanks,

Nithin.

View Entire Topic
Paulo_Pascoal
Explorer
0 Kudos

Hi @NithinM,
If I understood correctly you want to hide the console window, we had this problem too, to fix it I created one script and then changed all the shortcut from CCO to open this instead of the run.bat

I called it runNoConsole.vbs, this will prevent the console window to open, it will run hidden in background, and opening twice, the validation can be removed.

if you need to check any errors you need to use the log files.

Set oShell = CreateObject("Wscript.Shell")

' Retrieve the value of JAVA_HOME environment variable
javaHome = oShell.ExpandEnvironmentStrings("%JAVA_HOME%")

' Check if Java process is running
Set colProcessList = GetObject("winmgmts:\\.\root\cimv2").ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'java.exe'")
javaRunning = False

For Each objProcess in colProcessList
	' Get the full path of the running java.exe process
    processPath = objProcess.ExecutablePath
    
	' Compare process path with JAVA_HOME
    If InStr(LCase(processPath), LCase(javaHome)) = 1 Then
        javaRunning = True
        Exit For
    End If
Next

If Not javaRunning Then
    ' Java is not running, execute the batch file
    strArgs = "cmd /c run.bat"
    oShell.Run strArgs, 0, False
Else
    WScript.Echo "CCO already open"
End If