0

I'm developing a winform application that can retrieve the names of running excel document. I can retrieve it locally but I can't figure out how can I retrieve it from a remote pc.

The way I did on local pc was searching for the EXCEL.exe process then from there I'll find the active window and child of it.

I was wondering if there's any way that I can get the title of active window and its child's on a remote pc.

I was using the code below to find the process from local and remote.

w = GetObject("winmgmts:{impersonationLevel=impersonate}\\" & pc & "\root\cimv2")
        processQ = "SELECT * FROM win32_process WHERE name = 'EXCEL.EXE'"

I've search the internet and I couldn't find any method to do so.

Please help :(

ps. I don't even know what tags should I add for this question, sorry.

WLeo
  • 203
  • 2
  • 16
  • Can you explain the question a bit further? If I am not wrong, you need to access the desktop of a remote pc. But, is it from a website or a desktop application? How are you connected to remote pc? – jitendragarg Apr 19 '16 at 04:09
  • @jitendragarg I've edited the question – WLeo Apr 19 '16 at 05:40
  • The question is underdetermined. A PC can have multiple sessions, each of which has its own active window. – Raymond Chen Apr 19 '16 at 05:59
  • @RaymondChen then.. is there any way that I can retrieve the name of a running excel document remotely? – WLeo Apr 19 '16 at 06:21
  • What do you mean remotely? Do you mean like you have a desktop app running on PC 1 and you want the data from PC 2 (networked via wifi etc)? Or do you mean like it is a web app, and you want to get the data from client's system? – jitendragarg Apr 19 '16 at 06:43
  • If it is the second one, then sorry you can't do that without asking for additional permission from client pc – jitendragarg Apr 19 '16 at 06:45
  • @jitendragarg it's the first one.. – WLeo Apr 19 '16 at 07:12
  • I'm not aware of any built-in window manager remote functionality. You'll need a helper on the remote PC. – Raymond Chen Apr 19 '16 at 14:33

0 Answers0