TaskCentre Run Program problem

I cannot get the Run Program tool to do anything. I will try to make this as simple as possible.

After I started having problems I created a task called test program tool. All it does is run one batch file in the C: drive called test.bat which renames a file.

If I just browse to it in Run Program, it fails saying it cannot locate c:\test.bat.

If I add double-quotes around it like "c:\test.bat" it does not error, but does not rename the file.

The batch file is on a terminal server with the TaskCentre client.

Can Run Program only run programs on the server where TaskCentre Server resides? I am trying to run a .net program in the iMIS app server, and the TaskCentre server is on the SQL server.

I really am trying to run a createuser.exe file that takes one parameter, ID. I tried that at c:\Program Files (x86)\ASI\iMIS15\net\bin\createusers.exe and it either failed if not in quotes or acted like it executed in quotes. Same as the simple batch file. The program works when executed at the command line.

The exe takes just one parameter no output, input dialogs or anything. It does output a success message at the command line, but the program is done by then.

In any case, the simple batch file should work, a. What are the tricks to getting this to work?

Help!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

More details

Put the simple batch file on the TaskCentre server, mapped a network drive to it. Still same behavior.

Is this a permissions issue? What user does  TaskCentre use when it executes the program?

Additional Information

Additional Information:

TAskCentre server, version 4.5.1148 is running on SQL server box with Windows 2008 R2 SP1.

Have inquired with other consultants and Run Program, of .NET based exe files is working in other environments, the program on the same box as TaskCentre. But there are differences, one I viewed was Windows 2008 R2 no Service Pack and TaskCentre 4.5.1099.

Also are there special settings to prevent Windows User Access Control from interferring?
 
 

Windows User Access Control

Hi Mike,

What kind of user is running the task.  Is it a local or domain admin account?  Just wondering.

 

 

other thoughts.

Do you get a prompt asking for consent when running the task?

UAC for a service

If TaskCentre needed UAC authorization or some other prompting, I would not expect an error message.  More likely TaskCentre would lock up (if it runs these requests in-process), or if TC spawns a separate process for running commands, then you would see the task never ends and a process in TaskManager where it is running and waiting for input.
--
Bruce Wilson
Director, Technical Services
RSM McGladrey, Inc.

User is Local System Account

TaskCentre services run as Local System account.

I turned off User Access Control and gave EVERYONE access as a test.  Still no luck.

No prompt. I think TC would error if a message or input request would come up. User Access Control is currently turned off, so I don't get a prompt to allow access.

By the way, thanks for helping. It is something, but I have checked a lot of factors.

I wonder if there are any

I wonder if there are any errata on that version of TaskCentre in conjunction with Windows 2008 R2. 

Running a program from TaskCentre

These may not all be answers, but hopefully the observations will help.

  • Certain methods in Windows for running a program will only run an executable, but not a batch file or internal commands (like dir).  You can usually get around this by changing the command to cmd /c "test.bat"
  • TaskCentre can only run things on the server.  The Browse feature won't be very useful unless you're running the TC Client located on the server.  You should be able to type the path you know is correct (relative to the server's view) and it should still work.
  • TaskCentre Server permissions are determined by the account the service is started under.  Usual limitations apply (e.g. LocalSystem doesn't like to access network drives).  Running as Administrator is going to add new, bigger problems.
  • I think UAC will not apply if the service is running under a built-in account like LocalSystem, LocalService or NetworkService.

 

--
Bruce Wilson
Director, Technical Services
RSM McGladrey, Inc.

Solution to Run Program Problem

First of all, thanks for all the input.

Well.. I found the issue, but I don’t exactly understand it.

My batch file would not work in Desktop, but did work when I moved it to the C:\test directory your created.  Not sure why, but it did.
 
So I moved my real problem  .NET program to the c:\test directory, where the batch file worked, and it still did not work.
 
On a hunch I right clicked properties on my program and saw this at the bottom:
 
“This file came from another computer and might be blocked to help protect this computer”
 
I clicked the UNBLOCK button on the properties screen on every file that was part of the application, including dlls and xml files. There is no way to do this in “bulk” mode, just do one at a time.
 
So this issue would come up whenever you download a program you want to execute.  Strangely, I could manually run the program, but not with TaskCentre. So somehow my personal permissions in Windows gave me more rights than the LocalSystem account.
 
If you want to get rid of this blocking feature permanently then folllow this 
  1. Go to command line and run gpedit.msc  (group policy editor)
  2. Navigate to User Configuration > Administrative Templates > Windows Components > Attachment Manager
  3. Enable: Do not preserve zone information in file attachments
Not sure of other solutions, perhaps there is a way to give LocalSystem account some higher security, but at present this resolves the issue of TaskCentre not running programs .
 
Thanks for your help.

Ah, download flag

Just a guess - did you copy the software to the computer using a browser?  (Either a download or via webmail.)  The browser attaches this attribute to any file you download.

I wouldn't suggest turning the feature off completely - it's there for a reason and it does protect you.  Instead, just clear the flag on all the files after you download this way.

There are other ways to transfer the file that won't set the flag.  For instance, if you access the machine using RDP (Terminal Server), you can set the connection options to make your local drives visible in the TS session.  When this is enabled, you can access your local C: drive as \\tsclient\c, and copy files in either direction.
--
Bruce Wilson
Director, Technical Services
RSM McGladrey, Inc.