run a program from a server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • loloko29
    New Member
    • Jan 2013
    • 6

    run a program from a server

    hello, i badly need u guys, i want to as you about codes in which i will be able to run a program to another computer and launch it there too.
    for example, i got server and pc1. assuming that the exe is on pc1 and the launch program is on server. when i click the command button in server, exe in pc1 launches in pc1 also.

    is there any code for that? i tried shell, but when i do, it runs on the server. lol is there any way to make the program run on that pc1?
    thanks in advance, im using vb6.
    its for my project, so pls help :)
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    This is not a code writing service but if you post the code you've tried along with a description of the problem, we can help guide you to a solution.

    As a hint, you can use WMI to remotely run programs on other Windows machines. Assuming you have remote admin access of course.

    Comment

    • loloko29
      New Member
      • Jan 2013
      • 6

      #3
      hi, its the first time i have heard WMI, and i still don't have a code for that, what i am thinking is
      Shell ("c:\users\b lah blah")
      but when i run it, it runs in my pc, not in the pc that i wanted it to run, can this shell function do what i want?
      still thanks for the reply. :)

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        You can't use the a shell command to do that. You might be able to run and automate a telnet session to do it but I believe telnet connections are blocked by default. Or you can read up on using WMI.

        Comment

        • loloko29
          New Member
          • Jan 2013
          • 6

          #5
          can you give me an example code of WMI and what it can do, sorry, i cannot clearly understand what's on the net. lol

          Comment

          • loloko29
            New Member
            • Jan 2013
            • 6

            #6
            also, i've seen some WMI codes, and as i can see, its only for getting the hardware specifications of a computer, and its not what i need.

            Comment

            • Rabbit
              Recognized Expert MVP
              • Jan 2007
              • 12517

              #7
              WMI is more than getting information. It allows for remote management of computers. Including what you're trying to do.

              Comment

              • loloko29
                New Member
                • Jan 2013
                • 6

                #8
                can you link me to that site? i can't find a tutorial like website about WMI, its for VB6 right?

                Comment

                • Benniit
                  New Member
                  • May 2008
                  • 54

                  #9
                  If i understood your question well, u want a connection to a remote server so that u can run your program from another compuer, isn't it?
                  If so, if u are using sql server or access u need to write the connection or datalink properties to the systems registry. So, when u launch the program from your computer, it picks the connection values from your system and then connects to the remote server. Ben
                  Last edited by Benniit; Jan 26 '13, 01:08 PM. Reason: Error

                  Comment

                  • loloko29
                    New Member
                    • Jan 2013
                    • 6

                    #10
                    thanks for the effort of the two of you, but i got it now, through the use of winsock + shell. thanks anyway :)

                    Comment

                    Working...