|
-
Nov 14th, 1999, 11:02 PM
#1
Thread Starter
Member
Hi Everyone,
Just had a quick question. Is it possible to allow someone to update thier system time with the time control in VB?
If so, please let me know how that is possible.
Thanks!
-
Nov 14th, 1999, 11:13 PM
#2
Sure, using Time statement:
Code:
Dim MyTime
MyTime = #4:35:17 PM# ' Assign a time.
Time = MyTime ' Set system time to MyTime.
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
[This message has been edited by Serge (edited 11-15-1999).]
-
Nov 14th, 1999, 11:26 PM
#3
Thread Starter
Member
Will that code take the Mabry Time, and update the system time?
-
Nov 14th, 1999, 11:32 PM
#4
What do you mean Marby Time???
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
-
Nov 15th, 1999, 01:48 AM
#5
This is from MSDN:
Enabling Client Computers to Synchronize with Domain Time Source Server
For Windows NT client computers, type the following in the MS-DOS Command Prompt or add the following to the login script:
NET TIME /DOMAIN:<domain name> /SET
For Windows or MS-DOS based client computers, such as Windows, Windows for Workgroups, LAN Manager for MS-DOS or Microsoft Network Client for MS-DOS, type the following in the MS-DOS command prompt or add the following to the login script:
NET TIME /WORKGROUP:<domain name> /SET
NOTE: You can also synchronize all timesource computers with a master timesource computer using the command: NET TIME \\<computername> /SET. The master timesource computer can also be synchronized to an external time standard using the TIMESERV utility.
I hope this is what you're looking for.
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
-
Nov 15th, 1999, 01:53 AM
#6
Also from MSDN:
Remotely Synchronizing the Time Between Two Computers
Article ID: Q151712
The information in this article applies to:
Microsoft Windows NT Server versions 3.5, 3.51
SUMMARY
From time to time, you may need to synchronize a computer's time with that of another computer while lacking physical access to one or both computers. Using the AT Command Scheduler, you can issue a NET TIME command to the remote computer(s).
The following example shows how to synchronize the time for ComputerA with ComputerB in a situation where the user only has physical access to ComputerC.
1. From ComputerC, open a command prompt.
2. Type the following command:
"AT \\ComputerA <HH:MM:SS> /INTERACTIVE "NET TIME \\ComputerB /SET /Y""
(without the quotation marks)
This schedules the NET TIME command to run the next time ComputerA gets to
<HH:MM:SS>.
You can check the time on ComputerA by typing NET TIME \\COMPUTERA. This will display the time on the remote machine (though it may be inaccurate, based on ComputerA[ASCII 146]s time zone).
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
[This message has been edited by Serge (edited 11-15-1999).]
-
Nov 15th, 1999, 02:52 AM
#7
Thread Starter
Member
Hi Serge,
Your help is greatly appreciated. However, that's not quite what I was looking for. I need users to be able to push a button on thier version of the program that will match thier system time to that of the server time encoded within the program.
Thanks.
-
Nov 15th, 1999, 12:25 PM
#8
Thread Starter
Member
Mabry makes different controls that you can use with VB 6.0. One of those options is a Time control that you can setup to pull the time from a remote server.
I'm writing a time clock program for a company with 13 employees, on 13 different PC's. I need a command that will allow them to match thier system time to the time of the remote server.
Hope this helps.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|