Page 1 of 1

executecommand doesnt run a batch

Posted: Fri Oct 12, 2012 4:25 am
by BigG
Hi there, searched around but couldnt find any thing specific.

My TI runs an execute command for a batch, the batch file runs correctly if I manually run it. But TI does not run the process

the batch calls a vb script eg. C:\windows\system32\Cscript.exe E:\TM1_... ###.vbs

If I put a file create eg. dir > E:\TM1_...dir.txt it creates the file so the settings in the executecommand are pointing correctly.

Is there a setting in the batch file I would need to make so it can call a vbs?

thanks in advance.

Re: executecommand doesnt run a batch

Posted: Fri Oct 12, 2012 5:50 am
by winsonlee
I have tried running vbs file from a batch file using the TI execute command and it works.
Have you check if permission is given to the vbs file ?

did you try running other vbs script to see if it works ? Below is a sample script to create a directory and file which works when i run it.

Code: Select all


Option Explicit
Dim objFSO, objFSOText, objFolder, objFile
Dim strDirectory, strFile
strDirectory = "c:\tempx"
strFile = "\Summer.txt"

Set objFSO = CreateObject("Scripting.FileSystemObject")

Set objFolder = objFSO.CreateFolder(strDirectory)
Set objFile = objFSO.CreateTextFile(strDirectory & strFile)
Wscript.Echo "Just created " & strDirectory & strFile

Wscript.Quit

Re: executecommand doesnt run a batch

Posted: Mon Oct 15, 2012 1:42 pm
by Andy
Hi BigG,

does your batch needs any parameters?

Can you show us your TI script?

In my opnion it should not be a problem to run batch files from a TI process.
I just did it a few weeks ago.

By the way:
Which TM1 version do you use?

Re: executecommand doesnt run a batch

Posted: Mon Oct 15, 2012 2:10 pm
by asutcliffe
Depending on your OS and the nature of your vbs script, you might be encountering the problem I ran into here - http://www.tm1forum.com/viewtopic.php?p=33913#p34024.

Re: executecommand doesnt run a batch

Posted: Mon Oct 15, 2012 10:46 pm
by BigG
thanks for the replies, answers to questions:

It seems we are onto something with
viewtopic.php?p=33913#p34024. as it is also calling xml excel create vbs
creating C:\Windows\SysWOW64\config\systemprofile\Desktop folder

and it works!!!