I'm running a task sequence consisting of 3 separate command lines. The task sequence uninstalls the Tivoli Monitoring Agent using a customized vendor script (uninst.cmd). The task sequence is as follows:
Group - Uninstall Tivoli 6.2.3 FP3 (run only if the Tivoli agent v. 6.3.2 FP3 is installed)
1 - Create log file - (Command line) CMD.exe /c ECHO %DATE% %TIME% Starting Tivoli 6.2.3 FP3 uninstallation.>C:\Logs\Tivoli623FP3x-uninstall.log
2 - Log the current working directory - (Command line) CMD.exe /c ECHO %DATE% %TIME% Working directory: [%CD%].>>C:\Logs\Tivoli623FP3x-uninstall.log
3 - Run the agent uninstallation script - (Command line) CMD.EXE /C %CD%\UnInstall.cmd
It is our standard practice to generate step-by-step log files for all task sequences in addition to the usual log files generated by SCCM. This allows us to track the actual progress of the task sequence and pinpoint where possible errors occur.
The task sequence advertisement is set to download all package contents locally before running and use a remote DP if no local DP is available. I'm using SCCM 2007 R2. The 2 target servers are running Windows 2012 R2 servers.
Prior to running the task sequence, I've tested the whole sequence manually by running each command line from within the target servers and encountered no errors. The problem appeared after I started advertising the task sequence. The task sequence runs
the first 2 tasks without an issue but fails when it attempts to execute the third command line to run the uninstall script file.
When I checked the installation log files in the target servers, I found the following:
- Thu 10/02/2014 15:53:17.86 Starting Tivoli 6.2.3 FP3 uninstallation.
- Thu 10/02/2014 15:53:18.14 Working directory: [C:\windows\system32].
The working directory is set to [C:\windows\system32] instead of the SCCM cache directory [C:\Windows\SysWOW64\CCM\Cache] where the package contents are downloaded.
I also checked the execmgr.log files in both target servers and found that the working directory is getting set to the system32 folder:
- Successfully prepared command line "C:\windows\SysWOW64\CCM\TSLauncher.exe"
- Command line = "C:\windows\SysWOW64\CCM\TSLauncher.exe", Working Directory = C:\windows\system32\
Because of this, the command line to run the uninstallation script is failing.
I have some questions -
1 - What could be the reason why the working directory is set to C:\windows\system32 ?
2 - How do I make the task sequence point the working directory to the SCCM cache folder?
Thanks.
Ramon