mynock Posted February 8, 2005 Report Share Posted February 8, 2005 Hi! I need to realize a sub-vi that receives a time input and use this data to set current system time. Setting system time must be possible even if user doesn't have administrator privileges, therefore I cannot use directly System Exec.vi to set time using TIME command... any idea? thanks in advance! Quote Link to comment
malef Posted February 9, 2005 Report Share Posted February 9, 2005 Hi!I need to realize a sub-vi that receives a time input and use this data to set current system time. Setting system time must be possible even if user doesn't have administrator privileges, therefore I cannot use directly System Exec.vi to set time using TIME command... any idea? thanks in advance! 3812[/snapback] A snippet of my post to info-labview Date: Wed, 7 Jan 2004 09:47:54 +0100 On PC-machines the one and only real information about time is available on RTC-CMOS. You can read this information by OutPort and InPort conversation from any language. Everything else is hickhacked by OS and software. OutPortAddress = 70h InPortAddress = 71h WriteValue DataRead 00h seconds 02h minutes 04h hours 07h day 08h month 09h year No lability on this information. You will communicate down to CMOS! You can also write to RTC-CMOS Sorry I can't find the VI at the moment. Manfred :2cents: Quote Link to comment
Bryan Posted February 9, 2005 Report Share Posted February 9, 2005 I believe you can also do it through a command prompt if you want a little safer method of doing this, but I forget what the command is, it shouldn't be too hard to find though. Quote Link to comment
malef Posted February 9, 2005 Report Share Posted February 9, 2005 Sorry reading might be OK - but don't write to RTC For more details see: http://digital.ni.com/public.nsf/3efedde43...bd?OpenDocument Manfred Quote Link to comment
shamano Posted February 10, 2005 Report Share Posted February 10, 2005 Hi, Mynock! You can programmatically set Windows System Time as explained here: http://digital.ni.com/public.nsf/3efedde43...54?OpenDocument But, as you said, if you don't have Administrator or Power User privileges, you can't change system date or system time. You can run your program under a new created Power User account or, if you prefer run your program under a simple User account, you must change the "Change System Time" item in "User Right Assignment" in Windows "Local Security Settings" Console. Here the way to reach it: Control Panel -> Administrative Tools -> Local Security Policy -> Local Policies -> User Rights Assignment. Here you can find "Change the System Time" item. You have to add "Users" group to Security Setting List and reboot your machine. Now a simple User account can change system date and system time. I hope it will be useful for you. Greetings Quote Link to comment
mynock Posted February 10, 2005 Author Report Share Posted February 10, 2005 Ok, Shamano! i've already founded the ni.com hint, but your hint about administrative tools is very useful! :worship: bye! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.