Now that CMTrace is a part of the Configuration Manager client which is really great!, I still miss the fact that it is not made the default .log reader. It will save me at least 3 clicks 😉 on each machine I troubleshoot.
Here is a simple PowerShell script that will associate .Log and .Lo_ with C:\Windows\CCM\CMtrace.exe.
It also have an ActiveSetup that will add the registry key and value to remove the initial question shown below to make it the default reader for log files which really isn’t a real problem but still nice to remove.
It can be run as a script, program or in a Task Sequence to associate the .Log and .Lo_ with CMTrace.
It can be downloaded from here: CmtracePS
Let’s save 3 clicks!
Great script… hope you don’t mind that I made a few tweaks to it… we really try to avoid ActiveSetup in our environment so we have an easy workaround by mounting the user profiles for all users on the computer and inserting the key using the reg add command. My edited script credits you with the original.. feel free to use as needed.
Chris
Do you have the edited script to add it to default profile please Chris?
Hi Jorgen first can I deploy in MDT cmtrace.exe and after can I apply this script in my TS ? during my deployments
Yes, you can. I added it at the end of my task sequence. Make sure you have a step that copies CMTrace to the local host (if it’s not already in the image).
Hi
the script doesn’t work with Server 2016
the default viewer ist notepad 🙁
Worked fine for me on Server 2016. Great script!
Hi,
We have been using this for a while for 1909 now but it appears to no longer work when we move onto 20H2.
Is this an issue you or anyone else has experienced. If so do you have any idea why?
Hi,
Most likely that MS clears all manually added items to the Activesetup regkey, I will update it as soon as I have time..
Regards,
Jörgen
For 20H2 i was able to set default viewer using a combination of this script as well run default app associations from a reference system
Hi Jörgen Nilsson
Found an extra ‘.’ in the script. Seemed to fix issues.
On Windows 20H2 it doesn’t seem to work. Do you have a preview of the script update please?On Windows 20H2 it doesn’t seem to work. Do you have a preview of the script update please?
Great script, thanks for sharing Jorgen.
Hi Guys, I am upgrading from 1909 to 21H2 and this script doesn’t work for the log file assoc.
does any one have that works please?
It is indeed a great start and thank you so much.
I used it for a server 2022 task sequence and it worked as it says on the wrapper. I see this being useful for other apps too. Great work Jörgen