Page 1 of 1

Executing VB Script via Scheduled TI process

Posted: Fri Jun 11, 2010 6:43 am
by anoops81
Hi All ,

We face Issues in EV while giving restricted/limited access to users. We use element level security in our department dimension . EV fails to get the full outline of the dimension structure and the restricted user will get "Invalid Outline defenition Error" while opening reports . The workaround to reslove this error is to run VB scripts manually to do a forced preload for the particular database connection . We have been doing this manually .

I was trying to Schedule the VB Script run via TI process . So I wrote the following commands in the epilog part of a new TI process

ExecuteCommand('D:\bat\ActualsPnL.bat',0);
ExecuteCommand('D:\bat\Attrition.bat',0);
ExecuteCommand('D:\bat\GL_ActualsVsBudgets.bat',0);
ExecuteCommand('D:\bat\ResourceCategories.bat',0);
ExecuteCommand('D:\bat\ResourceP&L.bat',0);

I am also attaching the VB Scripts and .bat files for your reference.

But when I run the process , I can see many cmd.exe process generated (In task Manager ) and nothing happened , I had to kill those cmd.exe's.

Could you please correct me on where I went wrong ?


Thanks & Regards
Anoop

Re: Executing VB Script via Scheduled TI process

Posted: Fri Jun 11, 2010 7:30 am
by lotsaram
You can't just call the vbs. You need to call script.exe and pass the vbs as a parameter.

Look in this thread for the syntax.

Re: Executing VB Script via Scheduled TI process

Posted: Fri Jun 11, 2010 11:38 am
by anoops81
Thanks Lotsaram ,


I think it is working fine . I am not seeing the cmd.exe in windows task manager now. Is there any way to check whether the VB Script executed successfully for each run of the process ? When I am running the chore manually , I am getting "Process Executed Successfully" message .



Regards

Anoop

Re: Executing VB Script via Scheduled TI process

Posted: Mon Jun 14, 2010 4:39 pm
by anoops81
Hi All ,

I am using the following execute commands in the epilog of a TI process ,

ExecuteCommand('C:\windows\system32\Cscript.exe C:\Forced Preload VB Scripts\ForecedPreload_ResourceCategories.vbs',0);
ExecuteCommand('C:\windows\system32\Cscript.exe C:\Forced Preload VB Scripts\ForecedPreload_Actuals_AccountP&L.vbs',0);
ExecuteCommand('C:\windows\system32\Cscript.exe C:\Forced Preload VB Scripts\ForecedPreload_Actuals_Resource_Level.vbs',0);
ExecuteCommand('C:\windows\system32\Cscript.exe C:\Forced Preload VB Scripts\ForecedPreload_Aop_Actuals vs Budgets.vbs',0);
ExecuteCommand('C:\windows\system32\Cscript.exe C:\Forced Preload VB Scripts\ForecedPreload_Attrition.vbs',0);
ExecuteCommand('C:\windows\system32\Cscript.exe C:\Forced Preload VB Scripts\ForecedPreload_Attrition_old.vbs',0);
ExecuteCommand('C:\windows\system32\Cscript.exe C:\Forced Preload VB Scripts\ForecedPreload_HeadCount.vbs',0);
ExecuteCommand('C:\windows\system32\Cscript.exe C:\Forced Preload VB Scripts\ForecedPreload_ResourceCategories.vbs',0);
ExecuteCommand('C:\windows\system32\Cscript.exe C:\Forced Preload VB Scripts\ForcedPreload_GL_ActualsVsBudgets.vbs',0);
ExecuteCommand('C:\windows\system32\Cscript.exe C:\Forced Preload VB Scripts\ForcedPreload_Invoice_Aging_Report.vbs',0);
ExecuteCommand('C:\windows\system32\Cscript.exe C:\Forced Preload VB Scripts\ForcedPreload_PipeLine_Loss_Report.vbs',0);

Each of the VBScripts are supposed to do forced preload. But it is not happenning because i am getting the Invalid Outline Error. The Scripts are running fine when I am clicking them manually.

Could anyone please tell me what could be the reason ?



Regards
Anoop

Re: Executing VB Script via Scheduled TI process

Posted: Mon Jun 14, 2010 11:34 pm
by lotsaram
Check the permissions of the user account that the TM1 service is running under. Is it able to run scripts or is scripting disabled?

Re: Executing VB Script via Scheduled TI process

Posted: Tue Jun 15, 2010 7:51 am
by anoops81
Hi Lotsaram ,

I logged in as that particular user (Service Account for TM1) , i was able to run the scripts manually . The account is having admin privileges in the server .


Thanks & Regards

Anoop