Automate GoToMyPC Host in Systray

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
jpalic
Newbie
Posts: 17
Joined: Fri Aug 01, 2008 6:32 pm

Automate GoToMyPC Host in Systray

Post by jpalic » Wed Jun 19, 2013 7:35 pm

Looking for some advice on whether or not what I'm attempting is even possible...

We would like to automate setting nicknames for GoToMyPC hosts. On Windows XP, I can automate the GoToMyPC host process from the systray and populate the information. On Windows 7 I cannot - even if I run the macro with administrative privileges.

In Windows 7, once I set focus to the GoToMyPC system tray icon, Send> or MouseMove> commands do not work. It would seem that this is probably a privilege issue but it doesn't work even running as admin.

(I'm still using v12 - haven't updated yet..)

jpalic
Newbie
Posts: 17
Joined: Fri Aug 01, 2008 6:32 pm

Post by jpalic » Thu Jun 20, 2013 3:27 pm

Turns out that the GoToMyPC host processes run as the Local System account (SYSTEM in task manager).

Windows Vista and up User Account Control prevents sending keystrokes from lower privilege accounts into higher privilege accounts. Administrator is lower privilege than Local System so even running as Administrator no keystrokes are sent.

Using SysInternals psexec utility it is possible to run a compiled macro under the Local System account and then keys and mouse movement commands work.

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Thu Jun 20, 2013 3:38 pm

What about disabling User Account Control altogether?

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Fri Jun 21, 2013 1:34 am

You could also try creating a scheduled task, as you can have these run under the system account as well.
FIREFIGHTER

jpalic
Newbie
Posts: 17
Joined: Fri Aug 01, 2008 6:32 pm

Post by jpalic » Fri Jun 21, 2013 3:08 pm

Turning off User Account Control (UAC) does permit - at least when logged in with an administrative account - scripts to pass keystrokes to the GoToMyPC process running as Local System.

We're trying to automate the setup of host systems for our training classes. WIM files are deployed using imagex/dism and then GoToMyPC is set up to permit student access.

I don't know if it is feasible to turn off UAC in all cases. It may be that UAC has to be left on for labs in the classes to act the way that the course material shows. It was a good suggestion though - I wouldn't have guessed that the UAC level would have mattered in this case.

Using a Scheduled Tasks is a possibility. I need a solution that can be managed from the imaging process. After a WIM file is deployed to the host system the computer is still running a PXE version of Windows not the Windows that was just imaged. I have access to the files from PXE but I'd have to figure out if it's possible to set up a scheduled task from a batch file that would run when the imaged Windows starts up.

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Sat Jun 22, 2013 12:55 am

Scheduled tasks can be run from a command line you can even have ms create it. So it can be done once window has booted. You could then have a compiled ms executable run under the system account, it should then be able to interact with go to my pc tray.
FIREFIGHTER

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts