• Net Time /set replacement for bat file? (XPsp2)

    Home » Forums » AskWoody support » Windows » Windows Vista, XP and earlier » Questions: Vista, XP back to 3.1 » Net Time /set replacement for bat file? (XPsp2)

    • This topic has 2 replies, 2 voices, and was last updated 19 years ago.
    Author
    Topic
    #432208

    I need to set the correct date and time in a batch file. I’ve tried to use:

    NET TIME /SET

    But microsoft seems to have included a very annoying “Are you sure” prompt that I can’t seem to get around. I know it’s an old-fashioned concept, but I need my program to run without human interaction.

    Can anyone suggest a replacement command or utility?

    Thanks

    Viewing 0 reply threads
    Author
    Replies
    • #1013449

      try
      NET TIME /SET servername /YES

      StuartR

      • #1013451

        D’Oh ! igiveup

        The man page for net time doesn’t include that switch!

        But, realy, I should have thought of that,

        Thanks

    Viewing 0 reply threads
    Reply To: Net Time /set replacement for bat file? (XPsp2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: