4

I am developing a system where several i'm having to change date to Sunday February 06 3:30:50 AM.

Is there any way to create a .bat so that by clicking on it, the system automatically changes

Noor
  • 19,638
  • 38
  • 136
  • 254

2 Answers2

11

use the time and date commands:

time 03:30:50
date 06/02/2011
BlackBear
  • 22,411
  • 10
  • 48
  • 86
  • i'm using win 7, when i'm doing this , it is saying a required priviledge is not held by the client – Noor Feb 06 '11 at 13:07
  • @Noor: I have winXP, anyway, try this: http://aaronmargosis.members.winisp.net/MakeMeAdmin/MakeMeAdmin.zip, got from here: http://blogs.msdn.com/b/aaron_margosis/archive/2004/07/24/193721.aspx – BlackBear Feb 06 '11 at 13:12
  • 2
    @Noor: Just run the batch file with administrative privileges. I.e. right-click and »Run as administrator«. – Joey Feb 06 '11 at 18:23
  • THis is simple and nice.. Can it be converted to a batch script in some way? – Sisir Jun 25 '21 at 18:08
2

Answer obtained from BlackBear and Joey:

Run cmd as Administrator Then type commands such as :

time 03:30:50 date 06/02/2011

Noor
  • 19,638
  • 38
  • 136
  • 254