Hi guys good day. As of now I have no idea on how to achieve this, set the date time in my local machine. Any one here tried this one? If so a sample code or a link would be a good input.
Thanks in advance guys.
Printable View
Hi guys good day. As of now I have no idea on how to achieve this, set the date time in my local machine. Any one here tried this one? If so a sample code or a link would be a good input.
Thanks in advance guys.
Give me an M, give me an S, give me a D, give me an N.
http://msdn2.microsoft.com/en-us/library/ms172517.aspx
You've got a cute pompom's mate. :pQuote:
Originally Posted by jmcilhinney
btw thanks. :)
I just realised that that is for WinCE. It's all the same in big Windows except that the API functions are in Kernel32.dll
Also, note that the SYSTEMTIME object you pass must represent a UTC time. If you want to specify a local time then create a DateTime object and specify the Kind as Local, then call ToUniversalTime on it to get the equivalent UTC time. You would then set the SYSTEMTIME fields from that.
I did a deep search about this one and I found out WMI classes are perfect for this one and yeah it works. I just enable the priveleges of the managementobject.
Thank you for the input JM.