Start Application Remotely

Hey Experts, I'm trying to get an application that is installed on a remote computer to come up in the user's Window screen.   I've used the following code:

Private Sub ExecProg(ByVal ServerName As String, ByVal ProgramName As String)
        Dim process As Object
        Dim method As Object
        Dim inParam As Object
        Dim outParam As Object

        Dim processid As Long, result As Long

        process = GetObject("WinMgmts:{impersonationLevel=Impersonate, authenticationLevel=pktPrivacy}\\" & ServerName & "\root\cimv2:Win32_Process")

        method = process.Methods_("Create")
        inParam = method.inParameters.SpawnInstance_()
        inParam.CommandLine = ProgramName
        outParam = process.ExecMethod_("Create", inParam)

        If outParam.returnValue = 0 Then
            MsgBox("Method executed successfully")
            MsgBox("Method failed")
        End If
    End Sub

Which works and gets the program to show up in the processes as running, but the program does not execute on the screen.  What can I do to get the program to "pop up" on the users screen?
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.

Firstly, I am not sure this is possible but I will look a little deeper.

In the mean time, who is the process starting as? on the remote machine, check task manager for the user column on the processes tab.

Will see what else I can dig up.

This is what I was worried about:

I honestly dont thnk it is posible using WMI.


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
carmodykAuthor Commented:
Thanks for the link Andrew,  however it did state that as long as the program can interact with the desktop it can be done.  I have access to the remote computer and I could set the programm to interact with the desktop, but how?
carmodykAuthor Commented:
Ding!  Found the answer:

I would have to look in terminal services manager for user applications running.

And then to get the interact with desktop function running you have to modify the program to run as a service. In management tools/services. service "Logon" will allow you set how this program behaves.
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.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.