?
Solved

running command from VB-Program on unix-server

Posted on 2000-03-14
5
Medium Priority
?
203 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 200 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 28

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
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 viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month16 days, 23 hours left to enroll

862 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