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);
ExecuteCommand
-
- Community Contributor
- Posts: 349
- Joined: Tue Aug 17, 2010 6:31 am
- OLAP Product: Planning Analytics
- Version: 2.0.5
- Excel Version: 2016
-
- 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
"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.
-
- 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
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.
when going to start run and putting
cmd /c E:\test.bat
the bat files executes successfully.
Re: ExecuteCommand
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$
-
- 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
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.