Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Remote execute an application(executable).

Remote execute an application(executable).

Scheduled Pinned Locked Moved Visual Basic
xmlcsharpwcfsysadmin
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Len Naude
    wrote on last edited by
    #1

    Is it possable in VB.NET to execute an application on a remote machine over the internet so that the application opens (executes) on that specific web server. For examle: "c:\windows\system32\notepad.exe c:\file.txt" this should then open file.txt in notepad on the remote machine. I suppose this should be a SOAP, XML function.

    P 1 Reply Last reply
    0
    • L Len Naude

      Is it possable in VB.NET to execute an application on a remote machine over the internet so that the application opens (executes) on that specific web server. For examle: "c:\windows\system32\notepad.exe c:\file.txt" this should then open file.txt in notepad on the remote machine. I suppose this should be a SOAP, XML function.

      P Offline
      P Offline
      Paul Farry
      wrote on last edited by
      #2

      not sure about vb.net, but this should still work. Search the WMI stuff relating to remote launching, you basically connect to the server(remote machine), then tell it to create a process. I've written a component to do this in C++, but the reason for that is I'm using a Dialup connection to connect to 380 machines, and I need other operations to continue whilst the WMI connection starts(in a thread). If you don't have these issues, there are lots of WMI examples in MSDN for doing this. This is a function I've used previously. Function LaunchRemoteProgram(program As String, Optional user As String = "", Optional pass As String = "", Optional servername As String = ".") As Integer Dim objLocator As WbemScripting.SWbemLocator Dim objService As WbemScripting.SWbemServices Dim objInstance As WbemScripting.SWbemObject Set objLocator = New WbemScripting.SWbemLocator On Error Resume Next If servername = "." Then Set objService = objLocator.ConnectServer(".", "root\cimv2") Else Set objService = objLocator.ConnectServer(servername, "root\cimv2", user, pass) End If If Err.Number Then ' LaunchRemoteProgram = Err.Number Else Set objInstance = objService.Get("Win32_Process") objInstance.Security_.AuthenticationLevel = wbemAuthenticationLevelConnect objInstance.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate objInstance.Create program, Null, Null, LaunchRemoteProgram End If End Function Hi this is of use to you.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups