Link to home
Start Free TrialLog in
Avatar of Polarbaer
Polarbaer

asked on

running command from VB-Program on unix-server

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.
ASKER CERTIFIED SOLUTION
Avatar of mcrider
mcrider

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you want a telnet app in VB, look in www.netfokus.dk/vbadmincode/codevb 

there is a sample application there.
Avatar of Ark
Avatar of a201348
a201348

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.
Avatar of Polarbaer

ASKER

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.