Setting a registry value programmatically

I seem to recall reading in one SB1 document that you can set registry values programmatically.

 

I have not been able find this js api call.  Anyone have it handy?