LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting PC Time and Date as a User, not administrator

Good Day,
I'm trying to set the system time and date as a user. Currently running a hardware time server keeping the clocks on the network at the same time. The time is requested from the time sync server at the start of a DAQ run. This is to ensure every computer recording data has the same start time. We are currently changing network permissions and need to make a user run the software. User privelidges don't allow us to change the system time. Is there a way to allow a User to change the system time, or is that left to the Administrator only?
This function is already implimented on the administrator account and works successfully. Any information would be most appreciated.
Thanks
0 Kudos
Message 1 of 6
(3,198 Views)
Some time servers provide client programs or services running in background that actually make the sync.
Services have their own set of privileges that is independent on the current user.
External programs may be run with the runas command line utility to specify that the process will be run under another user's environment.
Hope this helps, although I guess you are trying to sync into your LV program.

Paolo

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 6
(3,192 Views)
I have used a time sync program called Tardis and a client program called K9 with success. The client program installs as a service and Tardis uses NTP to broadcast the time. Tardis has several options to get the master time. K9 checks every 30 seconds to see whether the pc's time is synced to the network time.
0 Kudos
Message 3 of 6
(3,185 Views)

The time is not the issue. Setting the time is. If your not the administrator, simply a user of the computer with user privileges..it will not allow you to change the system time. At the start of a DAQ run, we call to the Time Sync Server and request the time via UDP. It is sent back to us, and then this time is used to set the Local PC's system clock to the same time. We've found that having a typical resync every 30 min was not enough so we wanted to do the sync at the start of a data run. Due to security issues, we now have to implement users on the machines rather than using an administrator account. With the admin account you do not have to worry about this since admin's can change system clock. I'd done some research on Microsoft's site and you can allow users to change the system clock by adding that privilege to the account. Then they give you a minor registry edit to finish off the process. Here is the link..

http://support.microsoft.com/?id=300022

I will update accordingly when I have implemented this idea.

0 Kudos
Message 4 of 6
(3,178 Views)
The point of mine and the previous post is that the client software runs as a service and you do not have to integrate anything into your LabVIEW program. It just runs all of the time and does not matter who the user is. The client software is installed by someone with admin priveleges but that's all.
0 Kudos
Message 5 of 6
(3,174 Views)
P.C. was mentioned earlier so I will jump in and assume Windows....

If the system is (made) a member of a Window administrative domain then all this is already in the box, and should be part of a well managed system (I have managed it on a workgroup as well, see the articles below for details). It's one of the things I try to promote as we often have systems switched on for hundreds / thousands of hours and knowing when some guy accidently switched it all off is realy usefull Smiley Wink It helps with problems / events that occur outside our control and assists tracking down problems and stops drift / skewing of data.
Check out the following articles for more information: -
  Basic Operation of the Windows Time Service
  http://support.microsoft.com/kb/q224799/
  Registry entries for the W32 TimeService
  http://support.microsoft.com/default.aspx?scid=kb;en-us;Q223184
  Windows 2000 cannot set the correct time when it connects to multiple NTP servers
  http://support.microsoft.com/?id=837196

The time service is included on Windows XP as well. For NT4 there is / was a toolkit that allows operation from Microsoft.

Use the command NET TIME /? (on W2K and XP)
Either way you will come accross problems at the firewall if you want to get to an external time source. Unless you have on of those nifty little black boxes that pick up a radio signal from one of the available time sources.

I like Dennis Knutsons idea because you can't always get IT's attention, sometimes they need a little help, thanks again Dennis for another good tip.
0 Kudos
Message 6 of 6
(3,162 Views)