CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2003
    Location
    Philippines
    Posts
    168

    How to access a program?

    Dear gurus,

    Hi could I run a program for a computer on network by manipulating it on my code?

    Example:
    I have a program in my computer that will make appear a "hello" message in another computer.

    How could I command my code? What is the syntax?
    ------ Human Knowledge Belongs to the World ------

  2. #2
    Join Date
    Feb 2003
    Location
    Slovakia
    Posts
    23
    Hi,
    try to create a client application(will run on your PC) with a socket comunication and server application(start on remote PC) also with socket and exec(command), MexxageBox(string) for "Hallo" or define your own messages for handling what you want on remote PC.

    lubo

  3. #3
    Join Date
    Feb 2003
    Location
    Philippines
    Posts
    168
    what should I do if I want to run a program in a client pc where in I'm using a remote pc? waht is the syntax? how could I path it?
    example:
    "d:\test...."
    ------ Human Knowledge Belongs to the World ------

  4. #4
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,835

    Re: How to access a program?

    Originally posted by peevee12
    Example:
    I have a program in my computer that will make appear a "hello" message in another computer.
    I'm sure you'll have a perfectly legitimate intention here but you need to know that this kind of thing is considered illegal if you haven't obtained the recipient's permission.

    Somewhere in the US a legal action has been brought against a company who were sending popup messages that advertised a program (which the recipient had to pay for) which would stop the messages from appearing. However, nobody would have needed the program if the company hadn't been sending unsolicited messages in the first place. The courts regard this kind of thing as being akin to an extortion racket and the company is apparently being prosecuted for extortion.

    A few months ago I had the same problem myself from a UK based company calling itself the Chrysalis Group who kept sending popup network messages to my PC inviting me to subscribe to them so I could stop receiving the messages. I emailed them saying that there was already a major league corporation called the Chrysalis Group whose lawyers might be interested to know that they were trading under the same name. I received a very haughty reply saying that, in their view, the internet is a law unto itself and they would carry on sending the messages until I paid up. I reported them to a government department here called the Office of Fair Trading and I've never had a popup message since.

    Of course, none of this might apply to you. Your application might be perfectly innocent - but be warned. If your app is intended for distributing spam and you get caught, you could end up in serious trouble.
    "A problem well stated is a problem half solved.” - Charles F. Kettering

  5. #5
    Join Date
    Feb 2003
    Location
    Philippines
    Posts
    168
    I'm creating a computer rental system that will automatically freeze the clients pc if his time elapsed.Just simple as this,I have no intention to make it in a bigger place..so please tel me how could I do this
    ------ Human Knowledge Belongs to the World ------

  6. #6
    Join Date
    Jan 2004
    Location
    Bangalore
    Posts
    53

    Use Client/server program

    Hi,

    Try to develop a client program in MFC and also a server program.
    Run your server always in your system. And put your client program in client system startup. So that your client program will be automatically started.
    Use exitWindowsEx to shutdown the client machine or you can get the processes list of your client machine and you can close any process from your Server.

    Use CSocket class for your Server and client program.
    Regards
    MJV

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

Featured