question

BoydMills-9640 avatar image
0 Votes"
BoydMills-9640 asked DaisyZhou-MSFT commented

Windows 10IOT Users change system time

As per previous post:

https://social.technet.microsoft.com/Forums/en-US/e4b338a8-110d-4cfb-9e6e-e0376de3d7f3/windows-10-set-time-privilege-missing?forum=win10itprogeneral

In my application it is IMPERITIVE that Users be able to change the system time.
This has been available in Windows 2000, Windows XP, Windows Vista, Windows 7.

What is the means of accomplishing this?

Windows 10IOT is an embedded system. There is no "request Administrator Password" capability.

Please advise.

windows-10-securitydotnet-iot
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


////

include "stdafx.h"

include "windows.h"


int _tmain(int argc, _TCHAR* argv[])
{
SYSTEMTIME SystemTime;
GetLocalTime(&SystemTime);
if (!SetLocalTime(&SystemTime))
{
printf("setltime error %d", GetLastError());
}
return 0;
}/////
setltime error 1314

///
I have the Local Security Policies (secpol.msc):

Change the system time Everyone, Local Service, Administrators, Users
Change the time zone Everyone, Local Service, Administrators, Users
Replace a process level token Everyone, Local Service, Network Service

0 Votes 0 ·

Hello @BoydMills-9640,
How are things going on your end? Please keep me posted on this issue.
If you have any further questions or concerns about this question, please let us know.
I appreciate your time and efforts.

Best Regards,
Daisy Zhou

0 Votes 0 ·

Hello @BoydMills-9640,
I just want to confirm the current situations.
Please feel free to let us know if you need further assistance.


Best Regards,
Daisy Zhou

0 Votes 0 ·
DaisyZhou-MSFT avatar image
0 Votes"
DaisyZhou-MSFT answered

Hello @BoydMills-9640,

Thank you for posting here.

Have you tried the method in the link you provided via UI?

If so, can you change the system time on Windows 10IOT?

I am sorry, I did not know the code you mentioned.

Should you have any question, please feel free to let us know.



Best Regards,
Daisy Zhou

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BoydMills-9640 avatar image
0 Votes"
BoydMills-9640 answered DaisyZhou-MSFT commented

From the command prompt:

74403-image.png



And the following source code:


include "stdafx.h"

include "windows.h"


int _tmain(int argc, _TCHAR* argv[])
{
SYSTEMTIME SystemTime;
GetLocalTime(&SystemTime);
if (!SetLocalTime(&SystemTime))
{
printf("setltime error %d", GetLastError());
}
return 0;
}
YIELDS:
74348-image.png



image.png (87.5 KiB)
image.png (59.9 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @BoydMills-9640,

Thank you for your update.

Does Windows 10IOT have GUI? If so, can you change the time via GUI?
Do you run CMD as Aministrator?



Best Regards,
Daisy Zhou

0 Votes 0 ·
BoydMills-2010 avatar image
0 Votes"
BoydMills-2010 answered

Hi Daisy Zhou
Thank you for the response.
The Win10IOT machine is run as an industrial controller.
GUI is not guaranteed.
The applications must run as a regular user for security purposes.
However, the applications MUST be able to change the system time without human intervention.
This was easily done in Windows 2000, XT, Vista and 7 by allowing USERS to change time in the Local Security Policy.
They run in WORKGROUPS, not in a DOMAIN.
There is no guarantee of a "INTERNET TIME SERVER" to synch with.

Please advise.
Boyd

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DaisyZhou-MSFT avatar image
0 Votes"
DaisyZhou-MSFT answered

Hello @BoydMills-9640,

By default, the normal user can not be able to change the system time.

If you can edit the following policy via local group policy editor and add the regular users or user group.

Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Change the system time
76175-gp1.png

Then check if the the regular user can change the system time.


Hoep the information above is helpful.



Best Regards,
Daisy Zhou



gp1.png (98.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BoydMills-2010 avatar image
0 Votes"
BoydMills-2010 answered

Hi Daisy Zhou,

Seems the correct answer is

  1. as you pointed out

  2. PLUS the same for changing time zone - because they are sort of joined at the hip

  3. PLUS Replace a process level token



76845-image.png





image.png (85.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.