Jump to content

set system time


mynock

Recommended Posts

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!

Link to comment
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:

Link to comment

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.