This post is pending since long and finally has come out. CMtrace.exe (Configmgr guys favorite tool) is log file viewer which is friendly ,lot more easier to files with .log extension .To know more about about cmtrace log and its benefits, read Garth post here .
This tool can be downloaded from Configuration manager 2012 R2 tool kit http://www.microsoft.com/en-us/download/details.aspx?id=36213. Download and install the toolkit .After the install ,You will find CMTrace in C:\program files (x86)\Configmgr 2012 toolkit R2\clientTools.
Garth posted blog on How to install CMTrace using application model here .In this post,Garth explained ,how to copy the CMtrace tool to C:\windows\system32 and from there you can double click this tool to read .log files .
In my post,I will show you,how to make this tool as default log viewer for all users without the need of going to system32 and double click cmtrace.exe .
This process consists of 2 applications (both share common source) ,each with one deployment type. The reason for choosing 2 applications is because one app is for Computer (to copy cmtrace.exe) and other is for User to set default log viewer.
I did not try the method by creating single application with 2 deployment types ,1 copy cmtrace to computers and other for users that does the registry key changes .If you would like to try this method and if it works, drop your solution using the comments section.
Before we start creating applications,download the source files from here. This zip file contains 3 files 1)CMtrace (5.00.7958.1000) 2) Copy_CMTrace.bat 3) Set_CMtrace_Default_Log_Viewer.bat.
We will use the same content (zip file) to create 2 applications to achieve this task.
So first create application 1) Copy CMtrace using Garth blog post but don’t create any deployment ,just only application with deployment type. Distribute to DP’s.
After you are done with Garth post,you will see something like below with application and its deployment type.
Now lets create Application 2) CMTrace Default Log Viewer .Creation of the application with script as deployment is similar to other applications you normally create but one thing you need to look at is ,detection method which is given below.
Right Click and choose create application
Select manually specific application information
Enter the application Name
You can configure this section as you need else click next
Click Add Deployment Type
select manually specific the deployment type information
Enter the Deployment Type Name
Select the content location and installation program as shown below .
Click on Add clause
Use the following for detection rule:
User Experience tab ,select Installation behavior : Install for User ,Visibility:Hidden and maximum run time:15 min
Requirement Tab ,click next unless you have any requirements to check before it install
For Dependencies tab ,we will now add the Copy CMTrace that we created using Garth blog post
Click add Add under dependencies tab
Enter name and click on Add ,select the copy CMtrace script
Review Summary Page
Click Next ,next ,next
Distribute the application to distribution points ,monitor the status.
with this ,we have now created 2 applications with its deployment types and we are now ready to deploy to users.
We will now deploy the application (Set CMTrace Default log Viewer) to user based collection ONLY.
Right click on Set CMTrace Default log Viewer application and select deploy
select the User based collection
click next for the distribution points
deployment settings ,action: Install and Purpose:Required
select the scheduling time
User experience ,choose what you need
click next ,next next for the completion
Now ,let the user who is member of the deployed collection login to any client ,he/she will be able to open the .logs using cmtrace as default log viewer.
On User PC, initiate user policy retrieval from configuration manager applet,control panel ,wait for couple of min for client to download and execute the policy. Go to C:\windows\ccm\logs ,open any of the log, you will see the log file open automatically using cmtrace.
Thanks to Jay(happysccm) for providing the fix to suppress the above window (HKCU\Software\Microsoft\Trace32] "Register File Types"="0" )
scripts are updated with above registry setting.
We created 2 applications 1) for computer and 2) for user ---first app as dependency to this application and deploy to user collection.
Hope you enjoyed this article and helpful too!