Click here to Skip to main content
16,019,768 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
We have an application on all our seats that has to run as the current logged in users. From time to time we have to stop that application to troubleshoot and to get it to come back on we have to reboot becasue if we start it remotly its starting with our admin credentilas and we dont want that.

I have this code for starting it and i need to know how i would run this as the current logged in user on a remote computer.

VB
Dim strCommand = "C:\Progra~2\Hewlett-Packard\HPCA\Agent\SoftwareConnect.cmd"
Dim objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Dim objProcess = objWMIService.Get("Win32_Process")

objProcess.Create(strCommand)
MsgBox("RADTRAY.EXE started")
Posted

1 solution

You cannot start an interactive process on a remote machine. The process will launch, but the logged in user will never see any windows from it.

If you think about the security risk that introduces, it's quite obvious why you can't do it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900