Set fso = CreateObject("Scripting.FileSystemObject")
Set sh = CreateObject("Wscript.Shell")
dir = fso.GetParentFolderName(WScript.ScriptFullName)

Function FindNode()
  Dim candidates, i, expanded
  candidates = Array( _
    "C:\Program Files\nodejs\node.exe", _
    "C:\Program Files (x86)\nodejs\node.exe", _
    sh.ExpandEnvironmentStrings("%LOCALAPPDATA%\Programs\node\node.exe"), _
    sh.ExpandEnvironmentStrings("%LOCALAPPDATA%\fnm_multishells\node.exe") _
  )
  For i = 0 To UBound(candidates)
    If Len(candidates(i)) > 0 Then
      If fso.FileExists(candidates(i)) Then
        FindNode = candidates(i)
        Exit Function
      End If
    End If
  Next
  FindNode = "node.exe"
End Function

sh.Run """" & FindNode() & """ """ & dir & "\desktop-daemon.mjs""", 0, False
