Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    May 2003
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    629
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    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

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

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

    try
    <code>NET TIME /SET servername /YES</code>

    StuartR

  3. #3
    5 Star Lounger
    Join Date
    May 2003
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    629
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Net Time /set replacement for bat file? (XPsp2

    D'Oh ! <img src=/S/igiveup.gif border=0 alt=igiveup width=31 height=23>

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

    But, realy, I should have thought of that,

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •