Results 1 to 7 of 7

Thread: execute exe file in the Remote Server from Client

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2005
    Posts
    29

    execute exe file in the Remote Server from Client

    Dear all
    How can i execute exe file in the Remote Server
    from the Client Application in VB
    Can any one help me.
    i have tried using Shell
    Shell("path ipaddress /restart"
    i receive file not found
    regards
    Nagarjuna

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: execute exe file in the Remote Server from Client

    Shell to the computer name (\\computer\drive:\filename.exe) or the mapped drive (Z:\filename.exe), not the IP address.

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

    Re: execute exe file in the Remote Server from Client

    If your trying to execute a exe located on another system this way all it does it run the remote exe but it will run locally on your system. Also, if your trying to reboot a remote system you may need admin rights to access the remote system/exe.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Nov 2005
    Posts
    29

    Re: execute exe file in the Remote Server from Client

    Dear
    i tried with this
    Shell(\\computer\drive:\filename.exe) i
    and have received the message invalid procedure call.
    i want the exe to be run in the Remote System not in the Local.
    I want to activate the remote exe and and run there only.
    Regards
    Nagarjuna

  5. #5
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    Re: execute exe file in the Remote Server from Client

    you can do it with winsock, heres pseudocode:

    remote server listens on ports 8989
    client connects on 8989

    client sends request "RUN C:\ein32.exe"
    server receives data, sends ACK, parses it
    server executes, Shell (FilePath)
    server returns true or false to client

    something like that would do it, you'll need ur app on the client, and the server though
    Chris

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

    Re: execute exe file in the Remote Server from Client

    Ok, since you want iot to be run on the remote system then you will need Admin permissions on it and my code here will do it - http://www.vbforums.com/showthread.php?t=358108
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Nov 2005
    Posts
    29

    Re: execute exe file in the Remote Server from Client

    Dear Chris

    Can u give me vb eg for ur explanation if u had.
    thank to all for giving me the sugessions
    i want the remote vb exe to be run from the client application in VB
    Regards
    Nagarjuna

    remote server listens on ports 8989
    client connects on 8989

    client sends request "RUN C:\ein32.exe"
    server receives data, sends ACK, parses it
    server executes, Shell (FilePath)
    server returns true or false to client

    something like that would do it, you'll need ur app on the client, and the server though[/QUOTE]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width