I was able to figure this out. For those who may need to perform the same task, here is an example of the code:
regset “[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Dir\Dir\Dir]” “Key”="{(string values of selects “Model from Win32_ComputerSystem” of wmi)}"
Thanks for responding. We want to add a function in another application that will use this key for sorting. It cannot access WMI itself. I will try your code and see how it works out.