KBEC-00037 - Running steps that require an interactive Windows desktop on the agent machine

Article ID:360033194871
2 minute readKnowledge base

Description

If you are running steps that require access to the Windows interactive desktop, run the agent in an interactive session rather than as a service.

Solution

  1. Go to Control Panel > Administrative Tools > Services and stop the ElectricCommander Agent service.

  2. Run the runAgent.bat script. For Commander versions 3.2 and later, runAgent.bat is included in the product in the ElectricCommander bin directory.

  3. For Commander versions prior to 3.2: Create a batch file named runAgent.bat that changes working-directory to the ElectricCommander bin directory and launches the agent with the location of the agent.conf file. For a default installation, it may look like this:

     cd "C:\\Program Files\\Electric Cloud\\ElectricCommander\\bin"
     ecmdrAgent --config "C:/Documents and Settings/All Users/Application Data/Electric Cloud/ElectricCommander/conf/agent.conf"

The batch file is useful for starting the agent in the future (for example, if the machine crashes or is rebooted). However, this is not necessarily convenient. If the machine reboots, ideally the agent would start automatically in an interactive session—​this refinement can be accomplished as follows:

  1. Set the machine to auto-login [as the agent user] on reboot.

  2. Create a short-cut to the runAgent.bat file in the Agent user’s Startup folder. Typically:

     C:\Documents and Settings\_agentusername_\Start Menu\Programs\Startup
  3. Disable the ElectricCommander Agent service [in the Control Panel] to keep the service from starting on reboot.

Microsoft has freeware tools available for performing "power user tasks" in Windows called PowerToys TweakUI. This web page has several power user tools. Search the page for the TweakUI download link. After installing and launching TweakUI, a window opens with a list of action categories. Expand the Logon category and then choose Autologon. The right-side pane displays the current autologon settings, which you can update.

Although the tool advertises that it works for Windows XP, it works for Windows 2003 as well. The tool may work for Vista, too. Also, the tool is for 32-bit versions of these operating systems. For 64-bit Windows, you need the 64-bit version of TweakUI. Note that the 64-bit TweakUI is not published by Microsoft. This tool has proven useful on 64-bit machines at Electric Cloud, but your results may vary.