Solved

running command from VB-Program on unix-server

Posted on 2000-03-14
5
190 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
count7 challenge 12 70
VBA error replacing data 6 35
MS Access Search and Replace Using VBA 6 42
Problem to event 3 52
If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

760 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

17 Experts available now in Live!

Get 1:1 Help Now