
I have spent days/weeks on this, read numerous posts, tried everything (?) you have suggested, but I still can't get it to work.
Background:
OS: Windows Server 2008 R2
TM1 version: 10.2.2 FP2
TM1 is running as a Windows service under the 'administrator' account, the same user I'm logged on as.
I want to launch an Excel spreadsheet via a TI process, and for that purpose I use ExecuteCommand.
vCmd = 'C:\windows\system32\cscript.exe C:\3TM1DATA\ixReporter\LaunchExcel.vbs';
ExecuteCommand( vCmd, 0);
The VB script:
'Just to see if the script is executed
Set objFSO=CreateObject("Scripting.FileSystemObject")
outFile="c:\Confirmation.inf"
Set objFile = objFSO.CreateTextFile(outFile,True)
objFile.Write "Script executed" & vbCrLf
objFile.Close
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open("C:\3TM1DATA\ixReporter\PL201601.xlsx")
objExcel.Application.Visible = True
Result:
The script runs, no error message, Confirmation.inf is correctly created, but the Excel spreadsheet is not launched. Running the VBscript via Windows Explorer (double click) and the command prompt works fine. It also works if I run TM1 as an application.
I have learned from earlier posts that it probably has to do with security, that the user that runs the TM1 service doesn't have the right privileges. However, it runs under the 'administrator' account, and it works fine if I log on as the same user and run the script 'manually'.
Seems to be different ways to configure the ExecuteCommand CommandLine statement. Have tried these:
vCmd = 'cmd /c " C:\3TM1DATA\ixReporter\LaunchExcel.vbs "';
ExecuteCommand( vCmd, 0 );
vCmd = 'C:\windows\system32\cscript.exe C:\3TM1DATA\ixReporter\LaunchExcel.vbs';
ExecuteCommand( vCmd, 0 );
Which is the correct way?
Found (here: http://www.tm1forum.com/viewtopic.php?f=3&t=7697) the suggestion to add a folder named 'Desktop' under C:\Windows\SysWOW64\config\systemprofile\ and C:\Windows\System32\config\systemprofile\, ...still no success.
I turned on the debug option in the TM1 log, but I can't find anything suspicious.
What have I missed, anything else I can try, are there any additional logs I can analyse?
THANKS!