From: <sl...@bl...> - 2005-04-26 16:18:31
|
"Robert K Coffman Jr - Info From Data Corporation" <bco...@in...> writes: > >>How do I get a list of all of the words I can put after "net stop"? > >>The word "w32time" is not listed in the output of "net help stop". > > Great question. Here is one way. Right click My Computer - Manage - For the other people reading this message, on my Windows XP SP2 machine the path is: press Windows key (to bring up the main menu), "Administrative Tools", "Computer Management". > Go down to Services (Under Services and Applications) - This can be reached more directly on my machine by: press Windows key, "Administrative Tools", "Services". > Right click the service you are interested in - Properties - The > first thing listed is "Service Name" which is what you want. Thank you! Thank you! Thank you! > I believe you can also use the quoted service name from the list, > ie. "Windows Time". I was a bit worried about using "Windows Firewall / Internet Connection Sharing (ICS)" due to the spaces, slashes, parentheses, etc. Also, the lack of confirmation that this was one of the allowed names for use with "net start" and "net stop" did not help. The short name "SharedAccess" is also not listed as a legal option for "net start" and "net stop". Fairly unhelpful help text. :-( > >> w32tm /unregister > >> w32tm /unregister > >> w32tm /register > >> net time /setsntp:192.168.2.1 > >> w32tm /monitor > >> w32tm /resync > >> net start w32time > >> REM and for W2k > >> net stop w32time > >> w32tm -once > > >What does this do? The option "-once" is not listed in the help text > >output by just running "w32tm". > > The last three lines are for w2k. I have this script set so I can run it on > any machine and have it just "work." The help for -once says: > > -once do only one synchronization, then exit. > > It doesn't do anything on WinXP so it doesn't hurt to run it. > > >>Also, why stop and start the service again? > > Because of the w2k thing. I'm sure this could be cleaner, but it works! So I can just do everything up to the line that reads "REM and for W2k"? -- Thanks, Joe |