Remote Shell From VB6

How do I run a remote shell application from vb6.  I want a return code that the application was launch successfully.
serapionAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hesCommented:
In a module palce the following:

Public Type STARTUPINFO
    cb As Long
    lpReserved As String
    lpDesktop As String
    lpTitle As String
    dwX As Long
    dwY As Long
    dwXSize As Long
    dwYSize As Long
    dwXCountChars As Long
    dwYCountChars As Long
    dwFillAttribute As Long
    dwFlags As Long
    wShowWindow As Integer
    cbReserved2 As Integer
    lpReserved2 As Long
    hStdInput As Long
    hStdOutput As Long
    hStdError As Long
End Type

Public Type PROCESS_INFORMATION
    hProcess As Long
    hThread As Long
    dwProcessID As Long
    dwThreadID As Long
End Type

Declare Function CreateProcessA Lib "kernel32" _
(ByVal lpApplicationName As Long, ByVal lpCommandLine As _
String, ByVal lpProcessAttributes As Long, ByVal _
lpThreadAttributes As Long, ByVal bInheritHandles As Long, _
ByVal dwCreationFlags As Long, ByVal lpEnvironment As Long, _
ByVal lpCurrentDirectory As Long, lpStartupInfo As _
STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) _
As Long


In the form:

Dim proc As PROCESS_INFORMATION
Dim start As STARTUPINFO

start.cb = Len(start)

     ' Start the shelled application:
     ret& = CreateProcessA(0&, "Path\Filename", 0&, 0&, 1&, _
     NORMAL_PRIORITY_CLASS, 0&, 0&, start, proc)

if ret& = 0 then
  msgbox "App did not start"
end if
0
serapionAuthor Commented:
hes; 1/4/2000;
Is it assumed in CreateProcess that the "Path\Filename" be in the PATH environment variable?  The application that I need to launch is in a unix server with no "path" in the windows 95 client. Is there a Remote Shell (RSH) command in windows 95?

I found Remote Shell(RSH) command for Windows NT against Unix running the RSH service.



0
mcriderCommented:
Unfortunately, only NT supports the RSH.EXE command.  If you want to do unix remote shell commands, check out this link:

RemoteShell Version 2.2 ActiveX Control
http://www.pathguide.com/greg/rsh.htm 
 
It's a 3rd party control and can be licensed for $15...


Cheers!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
serapionAuthor Commented:
mcgrider;1/7/2000
This is another site that I found which is supposed to be free.

http://www.dongbuinsurance.co.kr/pds/m_winsock/0025.html

It is WinRSH - Remote Shell for Windows 1.6 // WinRSH32 - 32-bit Remote Shell for Windows 1.6.

Written by William Cheung

Thanks,
0
mcriderCommented:
Thanks for the points! Glad I could help!


Cheers!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.