Computing.Net > Forums > Windows 2000 > How to write a script to change clock

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

How to write a script to change clock

Reply to Message Icon

Name: EK
Date: June 23, 2002 at 00:47:04 Pacific
Comment:

Dear All,

Can someone teach me how to write a simple script to change the clock of Windows2000 and can be activated by shortcuts. If now, can you please point me to a site which I can look it out myself.

Thanks in advance!

Regards,
EK



Sponsored Link
Ads by Google

Response Number 1
Name: futuretech
Date: June 23, 2002 at 10:40:41 Pacific
Reply:

What do you want to set/sync the clock to?
If you have a server running or access to the internet you can use
net time /set computername (this would set the time from a computer of your choice on the network.)
net time /setsntp:address_of_a_time_server
As for a batch file you should be able to just write one that has the line time in it.
an example would be
Rem a batch file to allow the user to set the time on their computer
TIME
REM end of batch file.

Then save it as time.bat
This can be done through notepad.


0

Response Number 2
Name: futuretech
Date: June 23, 2002 at 10:42:46 Pacific
Reply:

I forgot to also add that you could then create a shortcut to the TIME.bat file and place it on the desktop or quick launch bar.


0

Response Number 3
Name: EK
Date: June 23, 2002 at 18:44:49 Pacific
Reply:

Thanks FutureTech!!!!! You instruction is very clear.

I would like to do something like this:

Step 1-Starting the program
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Save the current date (maybe to a file) -> Change the date to 1/1/19997 ->activate an old program which only run on that date.

Step 2-After using the program
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Read the date from the file -> Change back the date after using the program.

Can you help?

Thanks again!

Regards,
EK


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows 2000 Forum Home


Sponsored links

Ads by Google


Results for: How to write a script to change clock

I need a script for old accounts www.computing.net/answers/windows-2000/i-need-a-script-for-old-accounts/60767.html

how to send an IP address to a file www.computing.net/answers/windows-2000/how-to-send-an-ip-address-to-a-file/19848.html

How to make a macro in word? www.computing.net/answers/windows-2000/how-to-make-a-macro-in-word/44377.html