Re: WBEMTime question

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 07/25/04

  • Next message: Mal P: "Can I find associated .dll files for an .exe with WMI?"
    Date: Sun, 25 Jul 2004 16:10:17 +0200
    
    

    Nick Carroll wrote:

    > I'm trying to parse datetime values from WMI in C++. I want to use
    > WBEMTime, but it's not available for NT4 native, and my application needs to
    > run on NT4. Also, it's not recommended for use by Microsoft (see
    > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wbemtime.asp).
    > There is a scripting class to do the same operation (SWbemDateTime), but
    > it's only available for XP and above.
    >
    > Is there any code which is available to do this, or do I have to roll my
    > own? There is a spec for the format
    > (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi
    > /date_and_time_format.asp) which suggest using SWbemDateTime, which of
    > course is not feasible for any developer making an application for anything
    > earlier than Windows XP.
    >
    > Am I missing something obvious?
    Hi

    No, you will need to roll your own.

    For a VBScript version, see the function ConvWMIDateTime here:

    http://groups.google.com/groups?selm=%23d8Kd7VMEHA.1388%40TK2MSFTNGP09.phx.gbl

    -- 
    torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
    Administration scripting examples and an ONLINE version of
    the 1328 page Scripting Guide:
    http://www.microsoft.com/technet/scriptcenter/default.mspx
    

  • Next message: Mal P: "Can I find associated .dll files for an .exe with WMI?"

    Relevant Pages

    • Re: Is it safe to remove $NtUninstall files?
      ... Assuming i'm happy with the system and have no desire to roll back any of my ... Windows Updates, can I safely remove these files? ... I'm low on disk space, but can't figure out why, so these are the first to ... torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
      (microsoft.public.windowsxp.general)
    • Re: Does anybody make a Wall Mount for PDAs?
      ... | a lot of scripting at work so it was fairly easy to roll my own software ... Currently it controls a hardware interface I ... Could you post more details about the scripting you use? ...
      (comp.home.automation)
    • Re: Computer account SID
      ... We fear a disk cloning application was used to roll out some ... > workstations and that they now have duplicate SID's on the network. ... torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
      (microsoft.public.windows.server.scripting)