|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Remote Program Execution in Visual Basic
Quote:
|
|
#2
|
|||||
|
|||||
|
Re: Remote Program Execution in Visual Basic
I do not believe you can have the files execute w/o something running on the other end.
MSDN has plenty of info. I specialize in VB 6.0 (not .NET), so what I say will mostly apply to that. The Winsock control is probably the best way to do this. the Inet will work too, but is more geared for getting documents off the WWW. Both only come with Profesional and Enteprise Editions. I haven't actually done this yet, but I will try to give a simple tutorial based on the subs. On the server:
On each client:
I don't think Shell() runs bats, but if you add Shell32.dll to your references, you can use the Shell object to run anything. (Verbs) |
|
#3
|
|||||
|
|||||
|
Re: Remote Program Execution in Visual Basic
Quote:
Of corse you can run programs on a remote machine without installing anything on it! Thats how the blaster worm got so big! You can see if by going on any 2k box and using the command shutdown -i (-i is for interface, you can use --help if you wanna do it from the terminal). I have a similar situation at my school, and we solved it in a couple of ways. One of them was dameware (http://www.dameware.com/). Its not VB, but basically it lets you control lots of computers on your network. The second way I solved the problem through VB was very simple, but probably not the most efficient. I simply wrote a program that would check a text file on the file-server ever minute or so, and if there was a 1 in it, it would 'lock' the computer it was on, and if it was a 0, it would 'un lock' the computer. I realize this is an extremely inefficient way of doing things, but it was only took me a couple of hours to do. I'm not sure if either of these solutions will work for you, but I thought I might as well mention them. If you do get something working with winstock I would be interested in seeing it (if you dont mind), because I want to start playing around with it too (to write a similar applications). |
|
#4
|
|||
|
|||
|
Re: Remote Program Execution in Visual Basic
Ok, you need a daemon (that's "server" for you windows folks) listening on a TCP port, for commands to execute. Upon receiving them, it executes them.
Or, you can specialize the program, to wait on a TCP port for a textfile, keep reading until reaching a special character, save that into a .bat file, then execute.... But of course, security issues ![]() |
|
#5
|
|||
|
|||
|
Re: Remote Program Execution in Visual Basic
I have had to do something like this before, but I didn't use Visual Basic.
When I had to have a program run on multiple systems, I write small batch files and install them on all the target systems. These batch files go onto the network and get a list of commands to do, and then execute them. ex: --------------------------- @ECHO OFF NET USE * /d NET USE N: \\inferno\list /Y C: CD\ COPY N:\1.txt C:\1.bat CALL C:\1.bat DEL C:\1.bat REM Command Done I would put the requisite commands into 1.txt on a server of sorts. Inferno is my server, and list is a special share where I put 1.txt. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| White Paper Discuss: 2004 Visual Basic 6 Dashboard Control | CD47-Bot | Extra Discussion | 2 | 01-02-2005 01:56 |
| Visual Basic | dddriveman | Programming | 12 | 20-03-2004 13:03 |
| Help programming in Visual Basic | xxlshortys | Programming | 0 | 06-04-2003 08:54 |
| Computer Graphics and Visual Basic Programing | Gope | General Forum | 0 | 26-10-2002 13:44 |
| Anyone looking for more program space? | archiver | 2001 | 13 | 24-06-2002 02:20 |