Page 1 of 1 1
Topic Options
#126063 - 2004-09-02 03:46 PM Remote Computers
TexasBrownsFan Offline
Fresh Scripter

Registered: 2001-02-07
Posts: 36
Loc: Fort Worth , TX, USA
I have a script that i use that pushes out files to remote computers based on the Computer list from our windows domain. The problem that i am running into is that if a computer is turned off the script hangs for a minute or two on that computer until it moves on to the next computer.

Does anyone know how to eliminate this delay?

Top
#126064 - 2004-09-02 03:52 PM Re: Remote Computers
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Ping the computer first. There is a UDF posted that I use. XP SP2 could snooker you if you don't allow pings.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#126065 - 2004-09-02 05:02 PM Re: Remote Computers
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
Somethimes i find that ping not great. A remote pc will ping even if it is stuck at the shutdown in progress phase but you cannot access the reg or anything. Therefore the script will still hang

Try

Code:
  
If exist ("\\pc\c$\boot.ini")
; Dance
Else
; Dont Dance
Endif



_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#126066 - 2004-09-02 05:07 PM Re: Remote Computers
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
But that would run in the same network time out if the machine is off (mean only to return if something exists!)

the best way is a combination of ping and if reply ok, a mapping to ipc$ !
_________________________



Top
#126067 - 2004-09-02 05:07 PM Re: Remote Computers
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You are right, ping is not conclusive but an Exist() will cause a delay as well. I first do a ping, then I do an Exist(), then I proceed.
Code:
  if ping(split($list1.text,',')[0],0,1)
$reachable = '\\' + split($list1.text,',')[0] + '\C$$'
if not exist($reachable)
...

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#126068 - 2004-09-02 05:16 PM Re: Remote Computers
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
eh, again in the ame minute
_________________________



Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (morganw) and 925 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.055 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org