2

I want to create trial version for our product, allowing a user to use it for 5 days.

I am planning to use the system BIOS time to do this. Is this possible, what other methods are available to me?

Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
  • 1
    +1 No idea why this got 2 downvotes, I've made some minor tweaks to the title to improve it. – Paul Dixon Aug 11 '09 at 09:20
  • At least you should explain, why you need BIOS time, and shy OS time is not sufficient. – stepancheg Aug 11 '09 at 09:25
  • i want set the trail version for our product? 5 days trail. is this help me or not? else plz give me some good suggestion. –  Aug 11 '09 at 09:33
  • For this you can use Datetime.Now and by adding your trial period with that you will get the expiry date. – rahul Aug 11 '09 at 09:34

2 Answers2

1

If anyone changes the system date, the hardware real-time clock gets changed too.

So

DateTime.Now

will be able to do that for you.

rahul
  • 184,426
  • 49
  • 232
  • 263
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.

Sorantis
  • 14,496
  • 5
  • 31
  • 37