Is there a way to get a value from the registry using a CLR procedure that doesnt involve having to registry Microsoft.Win32 as an assembly in SQL Server?
I am looking to get the DigitalProductId (I will need to decode it to a string) from the registry within a CLR proc and return it to SQL.
Supported Namespaces
CustomMarshalers
Microsoft.VisualBasic
Microsoft.VisualC
mscorlib
System
System.Configuration
System.Data
System.Data.OracleClient
System.Data.SqlXml
System.Deployment
System.Security
System.Transactions
System.Web.Services
System.Xml
System.Core.dll
System.Xml.Linq.dll
Could I use a method in mscorlib for this?
Edit: Am I missing something here? Microsoft.Win32 appears to be usable in the CLR? Edit: Yes, I was missing something. It will need to be set as an UNSAFE assembly and then signed etc before I can use Microsoft.WIn32.