forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Set clock or get time from LAN...

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sun Feb 16, 2003 2:11 am    Post subject: Set clock or get time from LAN... Reply with quote

Hey guys, Smile

I'd like to synchronize all my LAN PCs with my machine. Am currently
using a VDS prog (from my machine) that creates a batch file on the
remote desktop. This file sets the remote PC clock to my time/date
settings, but it must be run from the remote machine immediately to
be accurate within a few seconds.

I'd like to either....

1. Retrieve my computer time from the remote machine without
anything running on my computer (considered constantly updating
a text file that the user can access, but don't really wanna write to
my hard drive every second...). Confused

2. Set the remote computer clock directly from my machine (have
had no luck with this, all attempts set my clock instead of the remote.
Running the remote batch file from my machine still sets my clock...). Confused

Any ideas?

Thanks, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sun Feb 16, 2003 4:03 am    Post subject: Reply with quote

Got an email from Larry H informing me about using the
"net time" command from the remote computer. I put it
in this simple VDS prog and it works perfect.
Code:

rem -- computer name to synchronize time with --
%%name = "Mac"

LIST CREATE, 1
LIST FILELIST, 1, "\\"%%name"\C", D
if @item(1)
   RUNZ command /c net time \\%%name /set /yes
else
   INFO %%name is NOT on LAN...@tab()
end

:CLOSE
  EXIT

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Sun Feb 16, 2003 11:58 am    Post subject: Reply with quote

Just test this program in the situation when the computer you are getting the time from is not available. We used to use some program that did something like this, but when the target you were getting the time from was not available, the computers all set their year to 2036.

I see you had a provision for the computer not being on the Lan, but I'm saying if it saw the computer but for some reason could not get the time.

That caused all sorts of trouble. Don't know why it was always 2036 when that happened though.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Mon Feb 17, 2003 12:08 am    Post subject: Reply with quote

Hey Mark,

I've used this method before - it tries to get a list of dirs
from the target computer's C drive. If it can't get the list,
the comp is unavailable for whatever reason. So far, if it
does get the list, all remote functions work OK. I do have
all drives shared though - if ya only have shared folders,
it might hafta be modified.

I came up with this method when I was playing with a LAN
chat program:

http://www.vdsworld.com/forum/viewtopic.php?t=494

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Mon Feb 17, 2003 12:31 pm    Post subject: Reply with quote

Cool -- I will try it and see if we ever have a problem and report back. Well, of course I can't test it in the office until we can go in -- just a little bit of snow happening in New York right now. Sad
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Tue Feb 18, 2003 3:08 pm    Post subject: Reply with quote

Yeah... a little bit of snow... Laughing
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group