running vbscript from TI process

Post Reply
jyoung66
Posts: 24
Joined: Fri Aug 13, 2010 2:14 am
OLAP Product: TM1
Version: PAW 2 PAX
Excel Version: 2016

running vbscript from TI process

Post by jyoung66 » Fri Oct 18, 2013 5:13 am

Hi

I have been trying unsuccessfully to run the following vbscript via an executecommand in a TI process.

There is the code:

#------------------------------------------------------------------------
vFileToUpdate='D:\TM1\Admin\Code\ListTest.txt';
vLineId='NextLine';
vNewText='3:48';

C_Update='cmd /c VBReplace.vbs "' | vFileToUpdate | '" "' | vLineID | '" "' | vNewText | ' " ';

ExecuteCommand(C_Update,0);
#-------------------------------------------------------------------------

The VBReplace.vbs is located in the same data directory as the TI process
I am able to run the script from a .bat in the data directory (for testing purposes)
Using ASCIIOUTPUT, I can see that my C_Update string works; I have taken the output and run it successfully from the cmd prompt
The TI says it was successfully run

This command DOES work, so it seems it just wont run the VBScript:
#-----------------------------------------------------------
#C_Update='cmd /c VBReplace.vbs "' | vFileToUpdate | '" "' | vLineID | '" "' | vNewText | ' " ';
C_Update='cmd /c dir D:\TM1\tm1test\Data > D:\TM1\Test2.txt';

ExecuteCommand(C_Update,0);
#------------------------------------------------------------


Can you help?

jyoung66
Posts: 24
Joined: Fri Aug 13, 2010 2:14 am
OLAP Product: TM1
Version: PAW 2 PAX
Excel Version: 2016

Re: running vbscript from TI process

Post by jyoung66 » Fri Oct 18, 2013 5:50 am

Never mind, I found it myself:

http://blog.tm1tutorials.com/tag/vbscript/

Post Reply