[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Start Application Remotely

Posted on 2004-10-26
4
Medium Priority
?
514 Views
Last Modified: 2006-11-17
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")
        Else
            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?
0
Comment
Question by:carmodyk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

by:andrewharris
ID: 12417503
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.

Andrew
0
 
LVL 4

Accepted Solution

by:
andrewharris earned 1200 total points
ID: 12417756
This is what I was worried about: http://www.dotnet247.com/247reference/msgs/36/181408.aspx

I honestly dont thnk it is posible using WMI.

Andrew
0
 
LVL 6

Author Comment

by:carmodyk
ID: 12420990
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?
0
 
LVL 6

Author Comment

by:carmodyk
ID: 12421031
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.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question