Hi All,
I am trying to execute a batch file in TI using the “ExecuteCommand†function.
ExecuteCommand('RenameFile.bat',0);
When I run the batch file manually it works fine.
The problem is when I run the batch file using the “ExecuteCommand†function. The TI process returns a “Process completed successfully†message, but it doesn’t do anything.
I know that the function can access the file, because it returns an error whenever I change the file name that I pass in.
I am using an administrator account to logon to Architect and the TM1 services are running as “Local System Accountâ€.
I have also tried to allow “Full Control†privilege to the batch file, but this did not fix the issue.
Does anyone know why this is happening?
Thanks!
ExecuteCommand Function in TI Unable to Run Batch File
-
- Posts: 48
- Joined: Thu Nov 19, 2009 10:38 pm
- OLAP Product: Tm1
- Version: 10.2.2
- Excel Version: 2010
Re: ExecuteCommand Function in TI Unable to Run Batch File
Maybe the file your are trying to rename is locked when the ExecuteCommand is being run - the TI process would still return “Process completed successfullyâ€.
J.Rizk
Tm1 for everyone
Tm1 for everyone
-
- MVP
- Posts: 2836
- Joined: Tue Feb 16, 2010 2:39 pm
- OLAP Product: TM1, Palo
- Version: Beginning of time thru 10.2
- Excel Version: 2003-2007-2010-2013
- Location: Atlanta, GA
- Contact:
Re: ExecuteCommand Function in TI Unable to Run Batch File
If you want to run a batch file from a TI process you have to open a command window (with a parameter set to automatically close the window upon completion) first and then run the batch file. It would look something like this:
CommandLine ='cmd /c RenameFile.bat';
ExecuteCommand(CommandLine, 0);
CommandLine ='cmd /c RenameFile.bat';
ExecuteCommand(CommandLine, 0);