Hi @Punit Shah 

Use the method LinkToFile below a example.

C:\temp before create the file:

Execute the code

Set file = ##Class(%Stream.FileBinary).%New()
Set statusCode = file.LinkToFile("c:\temp\test_file.txt")
If ($System.Status.IsError(statusCode))
  Do $System.Status.DisplayError(statusCode)
Do file.WriteLine($ListBuild("Some bin data"))
Write $System.Status.DisplayError(file.%Save())

After execution:

You can use add or remove programs too.

  • would I be correct to interpret 'CacheC' in the example command as the instance name of the Ensemble installation to be uninstalled? Or is that the folder name on the filesystem where it is in installed?

Is the instance name.

  • Not familiar with Windows Registry editing, so can I safely delete those two trees in the registry if i want a completely fresh start?

After uninstall and if you have only one installation yes.