Playing with Datto’s .cpt files

Playing with Datto’s .cpt files


Datto RMM allows components to be exported as .cpt files. In the help files, you can find some notes that let you know that the cpt file is really just a zip file. In their words, ” packaged as a .cpt file (a proprietary type of .zip file that includes an XML file and possibly additional files such as a batch file or image file that can be recognized as a Datto RMM file type when it is imported into another web portal”.

If you crack one open, you will find at least icon.png (if you chose a logo to use for the component), Command.bat (which contains whatever you pasted or wrote in the script field) and resource.xml.


This file will contain the script you wrote in the component. No matter what language you wrote it in, it will still be called command.bat. If you are messing around in here so you can sign your code you should check out my other post on that. The file in the export is encoded as just “UTF-8”. When executed however, it will be encoded in “UTF-8 with BOM” which will cause the file to hash differently.


This file will contain all the component variables, component name, and other settings. This is the only way I could find to take control of the order of variables in the component.

Check out changing the order of Variables

Can i delete the UID? it should be replaced when imported anyway.

Packing it back up

I found that using the windows “Compress to Zip File” would cause the import to fail. However, using Powershell compress-archive did create a file that could be imported after changing the extension.

compress-archive ".\<folder name>\*" -DestinationPath '.\<component name>.zip' -CompressionLevel Fastest
mv '.\<component name>.zip' '.\<component name>.cpt'

Why mess with it

I often run into issues where a component created on Zinfandel, will fail to import on Concord. I created the same component in each and exported to compare. This is what I found.