Announcement

Collapse
No announcement yet.

VB.net and Linux external command (restart process)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • VB.net and Linux external command (restart process)

    Hi,

    I use the following code to restart a Windows process, but need to know how to do the same on a Linux system. Remember that I'm not familiar with Linux, I just have a VM with HS installed, I received from another friendly HS user.
    Here's the working code for Windows.
    Code:
    Public Function RestartNode()
            HSLog(LOG_DEBUG3, "Start RestartNode")
            Dim Process As Object
            Dim app_exe = "node.exe"
            For Each Process In GetObject("winmgmts:").ExecQuery("Select Name from Win32_Process Where Name = '" & app_exe & "'")
                Process.Terminate()
            Next
            Return 0
        End Function
    Thanks,
    Regards,

    Rien du Pre
    The Netherlands
    Using:
    Homeseer PRO 3.0.0.435 on MacOS - Running a Mac Mini
    Plugin's:
    RFXCOM, Caddx, BLShutdown, BLLogMonitor, BLRadar, BLBackup, Log2Text, BLLAN, Z-Wave
Working...
X