2

我想为我们的产品创建试用版,允许用户使用 5 天。

我打算使用系统 BIOS 时间来执行此操作。这可能吗,我还有什么其他方法可用?

4

2 回答 2

1

如果有人更改系统日期,硬件实时时钟也会更改。

所以

DateTime.Now

将能够为您做到这一点。

于 2009-08-11T09:19:42.170 回答
0

If anyone changes the system date, the hardware real-time clock gets changed too. Why do you need BIOS? Are you trying to get a date and time from a more reliable source that the computer owner?

What you can do is use WMI to access BIOS information:

Win32_BIOS.BiosCharacteristics
Win32_BIOS.BIOSVersion
Win32_BIOS.BuildNumber
Win32_BIOS.Caption Win32_BIOS.CodeSet Win32_BIOS.CurrentLanguage
Win32_BIOS.Description
Win32_BIOS.IdentificationCode
Win32_BIOS.InstallableLanguages
Win32_BIOS.InstallDate
Win32_BIOS.LanguageEdition
Win32_BIOS.ListOfLanguages
Win32_BIOS.Manufacturer
Win32_BIOS.Name
Win32_BIOS.OtherTargetOS
Win32_BIOS.PrimaryBIOS
Win32_BIOS.ReleaseDate
Win32_BIOS.SerialNumber
Win32_BIOS.SMBIOSBIOSVersion
Win32_BIOS.SMBIOSMajorVersion
Win32_BIOS.SMBIOSMinorVersion
Win32_BIOS.SMBIOSPresent
Win32_BIOS.SoftwareElementID
Win32_BIOS.SoftwareElementState
Win32_BIOS.Status
Win32_BIOS.TargetOperatingSystem
Win32_BIOS.Version

But even WMI doesn't give you Date.

于 2009-08-11T09:29:05.177 回答