Solved

running command from VB-Program on unix-server

Posted on 2000-03-14
5
191 Views
Last Modified: 2013-11-13
I need to write a VB program, that runs under win nt, logs on to a unix server, runs an at-command and logs off again.

Is it possible and how can i do this.
Please help me.
0
Comment
Question by:Polarbaer
5 Comments
 
LVL 14

Accepted Solution

by:
mcrider earned 100 total points
ID: 2615268
Yes, you can do this.  I suggest you get ahold of an OCX that does rsh or telnet.  You can buy one here:  http://www.dart.com/default.asp

but you can probably find a freebee by searching the web.

You could also do it yourself using the winsock control, however, you will have to handle the protocol communications between your program and the UNIX server yourself... No small task!



Cheers!®©
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 2615285
If you want a telnet app in VB, look in www.netfokus.dk/vbadmincode/codevb 

there is a sample application there.
0
 
LVL 27

Expert Comment

by:Ark
ID: 2615387
0
 
LVL 1

Expert Comment

by:a201348
ID: 2616545
I don't know if it is a good answer for you. But here is something I did before.
Have your UNIX setup to allow the NT box to run rsh against the UNIX box.
The just shell out the rsh command in your VB program.
If you have more than 1 rsh command, you can dynamically create the batch file with all the commands that you need and use shell( batchfile, option ) in VB to run it. I did redirect the output to a file to check for expected return message or whatever to check for error.

I also found the following code to wait until the shell program is done.
taskID = Shell(strShellCommand, vbHide)
pHandle = OpenProcess(SYNCHRONIZE, False, taskID)
' Wait until DOS command has completed
ret = WaitForSingleObject(pHandle, INFINITE)
ret = CloseHandle(pHandle)

See if this is an answer for you.
0
 

Author Comment

by:Polarbaer
ID: 2620108
Hi,

Thanks for your comments. I am looking for an active-x control, if such a thing is available for this purpose.

Best Regards,
Polarbaer.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now