Berker Yüceer
Berker Yüceer

Reputation: 7335

Executing an exe in server from the client side in vb6

I have a terminal server that is connected to development server.

In my development server there is a shared folder that many ".exe" files contained.

What i want is any terminal on my terminal server that has permission to that shared folder should be able to start the ".exe" files.

But these ".exe" files cannot work on the terminal server. These ".exe" files required to work in my development server.

For that reason im trying to create an executer that will execute the ".exe" files i defined in my development server. How can i achive this in vb6?

Upvotes: 0

Views: 986

Answers (2)

Bob77
Bob77

Reputation: 13267

If the programs need to run on the second "development" server you need to RDP to that server if you want interaction.

About the only other thing you can do is break them into a client and a server, and run the client on the Terminal server. These clients would use DCOM, Web Services, etc. as the glue between the two pieces.

An exception might be programs written as command line or UI-less batch programs, fairly rare in most VB6 usage. These might be run by Telnetting to the second server or by remote execution. No point in elaborating on this though since it is even less likely to meet your needs. If you really do mean batch/non-interactive programs look into Remote Scripting with WSH.

Upvotes: 1

Joe M
Joe M

Reputation: 3440

If I understand your question, I think you'd want code that looks something like this

Sub Main()

    Dim objWSShell As Object
    Set objWSShell = CreateObject("Wscript.Shell")
    objWSShell.Run Command$, 0, True

End Sub

And you'd call your exe with the exe you want to run as a parameter:

MyAppRunner MyAppToRun.exe

Upvotes: 1

Related Questions