none
Change my date and time in cmd without Admin privileges RRS feed

  • Question

  • I originally posted this question on Microsoft Answers, and was directed to go here.

    I'm on Windows 7 Enterprise, 64-bit.

    I'm trying to add a function in my java program so it can change my computer's time based on certain input. I've figured out how to write to cmd from java using Runtime.getRuntime().exec("command")  (I've tested this in my code and it works). I've figured out how to set system time in cmd as an administrator (time [time]). My problem is I can only set the time when I enter cmd by right-clicking and selecting "Run as Administrator". I'm on a work-issued laptop and I don't have the Administrator password. I can open cmd and use runas with my own username and password, but I can't change system time. I've looked at my user account in the control panel and it says I'm an administrator, but I still don't have the ability to change my system time in cmd without specifically running it as Administrator. I would deeply appreciate any advice I can get on how to get around this. Thank you!
    Monday, July 9, 2012 3:58 PM

Answers

  • You must change the local group policy settings to add local users into the list of changing system time with the high privilege at the first time.

    Ivan-Liu

    TechNet Community Support

    Wednesday, July 11, 2012 1:29 AM

All replies

  • There are workarounds only. It depends on the expected functionality that you have not revealED.

    Examples of solution

    • Use Scheduled task
    • Use setting of time from remote computer (server)

    Regards

    Milos


    Monday, July 9, 2012 8:31 PM
  • Thank you for your reply, I'm not sure what you mean.

    Basically I want my java program to check a condition on a webpage, then set the system clock forward some amount of time, and check the condition again. I'm trying to make this completely automated so that one would only have to start my program, and then just let it run until it's finished. 

    Ultimately I either need to find out why I can't change the time when logged in with my username, and how I can fix that; or how to change the time without admin privileges. Maybe there is some way to set it so that the time can be changed by any user on the computer, though I've looked through control panel and I haven't been able to figure out how to do that.

    Thank you, 

    kittimiyo

    Monday, July 9, 2012 8:53 PM
  • How to Allow People to Change Their Time Using a Group Policy in Windows XP

    http://www.ehow.com/how_8111273_allow-group-policy-windows-xp.html

    Ivan-Liu

    TechNet Community Support


    • Edited by Ivan-Liu Tuesday, July 10, 2012 7:47 AM
    Tuesday, July 10, 2012 7:45 AM
  • This was useful, but it did not solve my problem. Thank you fro your effort, I think I'm just going to drop it. I've been trying for a week to solve this. 
    Tuesday, July 10, 2012 7:43 PM
  • You must change the local group policy settings to add local users into the list of changing system time with the high privilege at the first time.

    Ivan-Liu

    TechNet Community Support

    Wednesday, July 11, 2012 1:29 AM