Solved

running command from VB-Program on unix-server

Posted on 2000-03-14
5
196 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

726 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