How to get a company script to run when users double-click models and keep thumbnails!
Ok. This took me a while to work through and I though I would share it for others.
My goal was simple, avoid users from starting Creo without going through the company start-up script. This meant, that if they double-clicked a .asm or .prt... it would have to load the script and pass the file name through. Along with this, I wanted to keep the thumbnails that PTC Thumbnail viewer generates in Windows. The solution is to use the below code after running the silent install code:
The first portion of code changes the startup path for each extension class to the path of the startup script (RegOpenPath)
The class name (prtFile, asmFile, etc) was found by going to HKEY_CLASSES_ROOT in regedit and viewing the default data value