I have a simple TI which calls a batch via the executeCommand function. The syntax is simple:
Code: Select all
ExecuteCommand('z:\path\Folder\batch.bat',0)
But the TM1 windows service never shuts down.
My C# program creates files, which get created upon the TI call to the batch to the program, but the windows service its self does not shut down....but..it does when I fire the batch manually.
My batch is also simple:
Code: Select all
z:
dir > beforecall.txt
REM -- arg1,2 are the arguments for the program
start z:\folder\CloseService.exe arg1 arg2
dir > afterCall.txt
When I fire the TI which fires the batch it creates these two files and the file from the program but it does not shutdown the windows service, even though it does so when run manually.
I know the documentation for the ExecuteCommand says this:
You can use ExecuteCommand to run a desktop application, but not a service.
But I am not using the ExecuteCommand function to work with a service...the function is calling a batch that calls a C# program which shuts off the server.
To re cap - Firing a TI which fires a batch which fires a C# program, creates files from the C# program and from the batch but does not shut down a windows service from the C# program.
It will however work if I fire the batch manually.
Any ideas? Any help would be great.
Thank you.