ExecuteCommand

Post Reply
PlanningDev
Community Contributor
Posts: 349
Joined: Tue Aug 17, 2010 6:31 am
OLAP Product: Planning Analytics
Version: 2.0.5
Excel Version: 2016

ExecuteCommand

Post by PlanningDev »

I have tried just about everything I could think of but I can't seem to get ExecuteCommand to work. No matter how I seem to change the command it always says process completed successfully but nothing happens.

Have I missed something? TM1 is installed on E:, I tried adding E:\ to the front of the path environment variable, I tried putting test.bat in the TM1 bin directory, TM1 directory, TM1 datadirectory, I tried adding the TM1 bin directory to the path environment variable. It just doesn't want to go.

Heres what Ive tried

CommandLine ='E:\Test.bat';
ExecuteCommand(CommandLine, 0);

CommandLine ='cmd /c E:\Test.bat';
ExecuteCommand(CommandLine, 0);

ExecuteCommand('CMD /c E:\Test.bat', 0);

ExecuteCommand('E:\Test.bat', 0);
tomok
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

Post by tomok »

"E:\test.bat" says that the file test.bat is in the root of drive E". Is it? If not you have to provide the complete path to it, not just the drive letter.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
PlanningDev
Community Contributor
Posts: 349
Joined: Tue Aug 17, 2010 6:31 am
OLAP Product: Planning Analytics
Version: 2.0.5
Excel Version: 2016

Re: ExecuteCommand

Post by PlanningDev »

I put the bat file in the root of E: for testing purposes. It made the file path shorter.

when going to start run and putting

cmd /c E:\test.bat

the bat files executes successfully.
dubs
Posts: 131
Joined: Fri May 22, 2009 10:43 am
Version: 9.4
Excel Version: 2003

Re: ExecuteCommand

Post by dubs »

If it is a mapped network drive Windows will know what location e: refers to be TM1 probably won't so try using the fully qualified server name instead, setup a share on the c: drive and reference it as

Code: Select all

[fully qualified server name]\c$
tomok
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

Post by tomok »

The /c parameter on the CMD command says to automatically close the window. Take this parameter off and try it again from the TI process. Then go to the server and look at the desktop for the account that the TM1 service is running under. The command window should still be sitting there. Look to see if there are any errors. Maybe that will give you the clue you need.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Post Reply