Wine + .Net Core + serial number motherboard

Questions about Wine on Linux
Locked
gerod
Newbie
Newbie
Posts: 2
Joined: Tue Feb 11, 2020 12:59 pm

Wine + .Net Core + serial number motherboard

Post by gerod »

Hey. I ask for help, because I do not know where else to write. U change has a program (wpf c #) that gets the serial number of the motherboard and hard drives as hardware binding. There is a need to run this program on ubuntu and Mac OS under wine. How can this be cranked up? I get the code for receiving the serial number, an error too.

Code: Select all

                ManagementObjectSearcher mos = new ManagementObjectSearcher("SELECT * FROM Win32_BaseBoard");
                ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_PhysicalMedia");
                ManagementObjectCollection moc = mos.Get();
                string motherBoard = "";
                foreach (ManagementObject mo in moc)
                {
                    motherBoard = (string)mo["SerialNumber"];
                }
                foreach (ManagementObject hdd in searcher.Get())
                {
                    motherBoard += (string)hdd["SerialNumber"];
                }

                ClientKey = motherBoard;
System.TypeInitializationException: The type initializer for 'System.Management.WmiNetUtilsHelper' threw an exception.
---> System.ComponentModel.Win32Exception (126): Failed to load required native library 'C:\windows\Microsoft.NET\Framework\v4.0.30319\wminet_utils.dll'.
at System.Management.WmiNetUtilsHelper..cctor()
--- End of inner exception stack trace ---
at System.Management.ThreadDispatch.Start()
at System.Management.ManagementScope.Initialize()
at System.Management.ManagementObjectSearcher.Initialize()
at System.Management.ManagementObjectSearcher.Get()
gerod
Newbie
Newbie
Posts: 2
Joined: Tue Feb 11, 2020 12:59 pm

Re: Wine + .Net Core + serial number motherboard

Post by gerod »

If there are no ideas, then tell me how through cmd in wine you can get data about the system in which it works. I'm interested in serial numbers, by which I can bind the app to the hardware.
Locked