hi,
Is it possible to start an app like say Notepad on other computer through my computer when both are connected to eachother via LAN
Printable View
hi,
Is it possible to start an app like say Notepad on other computer through my computer when both are connected to eachother via LAN
You'll need to start a new application, and brush up on your winsock.
Winsock is a control (u can use the Winsock API, but I suggest the control until you get the hand of it) to transfer data.
By transferring data as flag (which you can define) the target computer can decipher the flags and take the appropriate action.
Eg. say you set 'FG_RUNPROGRAM, C:\WINDOWS\NOTEPAD.exe'
as one of your flags, if u hard code the FG_... part into both programs then at the target end u can tell the program to ShellExecute() anything trailing the ', '.
Make any sense?
but here i will have to write an app to listen to the commands(for the other computer), right? can it be done in such a way that u don't have to write any app for the other computer, is it possible?
I don't think it is possible. Every app or even a trojan that does this has atleast one instance running on the computer where it needs to execute some file or command.
It's not impossible, but your gonna have to make it so that the one application has both the ability of client and server. That makes it kinda dangerous, cause the client in effect can control the server which isn't a good idea.
Most setups have 2 separate applications. You could just write a list of constants in a text file and add it as a resource to both programs if you wanted to save time. But yeah, I'd definitley have to say that it would be better if you wrote two separate programs.
thnx for ur replies.
wak, what u suggested still needs to have the app on both the computers, right?
i wrote a single app which does both the things(send and receive), just like any chat program, just that the incoming messeges are treated as commands.
while writing this app i came accross some APIs which were NT specific like one for shutting down any computer in the network. so i was wondering whether the other things like running and closing apps on other PC (NT clients) is possible in NT??
any idea?
I think in this case too, OS constantly listens ot messages from different computers if Remote Administration is enabled.
the app that i wrote needs the user to enter the computers name to send the command to. how can i get the names of all the computers connected to me via LAN, like network neighbourhood displays all the computers name.
plz help.
thnx amitabh, i will check them out