Weird vbs file keeps prompting on Windows 10

bword

Member
Reaction score
4
Location
Naugatuck, CT
I have a windows 10 laptop that will periodically get a prompt asking what to do with a .VBS file. I cant quite figure it out as I dont speak that language. This laptop is used for Auto body estimates and it appears to be connected with the VBS file. If I chose Notepad to open it I get this....

Code:
DIM WinScriptHost
DIM Fso
DIM Service
DIM WshShell
DIM Args
DIM continueExec
DIM argsLength

'Get Cmd Line Arguments
Set Args = WScript.Arguments
Set Fso = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
continueExec = False

' For Vista and greater, we pass in the clickonce link as an argument
argsLength = CStr(Args.Length)
if (argsLength = 0) Then
    continueExec = True
Else
    ' A clickonce link was passed in thru Vista or greater
    If (Fso.FileExists(Args(0))) Then
        continueExec = True
    End If   
End If

if (continueExec) Then
    'If Tray Agent is not running, launch
    If isProcessRunning(".", "OEConnection.CollisionLink.Shop.TrayAgent.exe", WshShell.ExpandEnvironmentStrings("%USERNAME%")) = FALSE  Then
        Set WinScriptHost = CreateObject("WScript.Shell")

        'Change the current working directory to where this running script is
        WinScriptHost.CurrentDirectory = Left(Wscript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\"))

        'Run tray agent exe only if the .exe can be found.
        'Will update itself at 10 am.
        If (Fso.FileExists("OEConnection.CollisionLink.Shop.TrayAgent.exe")) Then
            WinScriptHost.Exec("OEConnection.CollisionLink.Shop.TrayAgent.exe")
        End If
    End If

End If

FUNCTION isProcessRunning(ByRef strComputer, ByRef strProcess, ByRef strUserName)
    DIM objWMIService, strWMIQuery, objProcess, strOwner, Response

    strWMIQuery = "SELECT * FROM Win32_Process WHERE NAME = '" & strProcess & "'"

    SET objWMIService = GETOBJECT("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2").ExecQuery(strWMIQuery)

    IF objWMIService.Count > 0 THEN
        For Each objProcess in objWMIService
            Response = objProcess.GetOwner(strOwner)
            If Response = 0 Then
                If strUserName = strOwner Then
                    isProcessRunning = TRUE
                Else
                    'do nothing as you only want to detect the current user running it
                    isProcessRunning = FALSE
                End If
            End If
        Next
    ELSE
        isProcessRunning = FALSE
    END If
End Function

Set Args = Nothing
Set WinScriptHost = Nothing
Set Fso = Nothing
Set WshShell = Nothing

Im not sure what its looking for but im guessing something to do with "Connection.CollisionLink.Shop.TrayAgent.exe"
 
I guess if maybe somebody could tell me how to find what is causing the prompt to pop like what source its originating from?
 
No its actively being used and its actually running/working fine.
Uh not quite true or you wouldn't be asking the question in the first place. For whatever reason the VBS script isn't running. Either the file it wants to run is missing or VB support isn't working on this Windows 10 box. Now it may be that this agent is just an annoying program that doesn't need to run on startup or a needed/desirable/unknown feature is dead.
 
Its trying to run a exe to access File System Objects [Fso] Tray Agent.exe.
I bet someone there has a Samsung phone o_O


It may be Samsung KIES Tray Agent?

  • Type msconfig in the search bar
  • Select STARTUP tab
  • Click Open Task Manager
  • Disable KIES TrayAgent Manager
 
Last edited:
Back
Top