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.
Is it possible and how can i do this.
Please help me.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi
Take a look at http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=5089
Cheers
Take a look at http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=5089
Cheers
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(pHandl e, INFINITE)
ret = CloseHandle(pHandle)
See if this is an answer for you.
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(pHandl
ret = CloseHandle(pHandle)
See if this is an answer for you.
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.
Thanks for your comments. I am looking for an active-x control, if such a thing is available for this purpose.
Best Regards,
Polarbaer.
there is a sample application there.