Page 1 of 1 1
Topic Options
#146229 - 2005-08-23 12:57 PM How can i check wether the DC iss accessible?
TanzBaer Offline
Fresh Scripter

Registered: 2005-08-23
Posts: 5
Hello,

I'm new and i have a problem.

For example in our company we have logon scripts, they connect the HOMEDIR... , even on notebooks.

If they are in the company there give no problems, but when they are not in the company all scripts will failed -> no DC accessible.

So I need a script that will check whether the DC accessible or not and when not the other scripts will not execute -> so no problems

Thanks for all reply

TanzBaer

Top
#146230 - 2005-08-23 01:06 PM Re: How can i check wether the DC iss accessible?
snake Offline
Fresh Scripter

Registered: 2005-08-22
Posts: 30
Loc: Germany
hmm ping it und then make a decision

is it reachable -> connect
when not ? use the local profile an dont connect

its a easy if instruction

Top
#146231 - 2005-08-23 01:13 PM Re: How can i check wether the DC iss accessible?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
not needed actually.
logonscripts won't run if the computer is logged on offline.

thus, no need to check anything.
every time logonscripts run, the DC is reachable.
_________________________
!

download KiXnet

Top
#146232 - 2005-08-23 01:23 PM Re: How can i check wether the DC iss accessible?
snake Offline
Fresh Scripter

Registered: 2005-08-22
Posts: 30
Loc: Germany
realy ? hm ok

but he have the problem also in the offline mode ???

then he have set the homedir in the policy ?

than if he set the homedir in the logonscript the didnīt start because in offline mode no kix start..

Top
#146233 - 2005-08-23 01:56 PM Re: How can i check wether the DC iss accessible?
TanzBaer Offline
Fresh Scripter

Registered: 2005-08-23
Posts: 5
thanks

i will test it with ping and if

...
these scripts are local on the notebooks and will execute when the notebook starts -> on or offline mode

greets

Top
#146234 - 2005-08-23 02:00 PM Re: How can i check wether the DC iss accessible?
snake Offline
Fresh Scripter

Registered: 2005-08-22
Posts: 30
Loc: Germany
ok than i think it will be work with the ping mode
Top
#146235 - 2005-08-23 05:15 PM Re: How can i check wether the DC iss accessible?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, best fix would be to start using logonscripts and drop those local scripts.
_________________________
!

download KiXnet

Top
#146236 - 2005-08-25 12:04 PM Re: How can i check wether the DC iss accessible?
TanzBaer Offline
Fresh Scripter

Registered: 2005-08-23
Posts: 5
Sorry

but I'm a noob.

I don't find anything to ping mode or comobject ping.

Can you write a short syntax for the ping mode where did i see what i must do.

thanks for all

Top
#146237 - 2005-08-25 12:36 PM Re: How can i check wether the DC iss accessible?
snake Offline
Fresh Scripter

Registered: 2005-08-22
Posts: 30
Loc: Germany
hmm ok i have edit the script from Thorsten Gerds
here is the link to the orginal script

http://www.adminscripteditor.com/scriptlibrary/view.asp?id=332

now to the edit script

--------
Break on

CLS

$ip = ;tip here in the ip

Function Ping ( $ip)
$cmd="Ping -n 1 "+ $ip+ ' | Find /I "TTL=" >NUL'
Shell "%COMSPEC% /C "+$cmd

If @ERROR = 0
$Ping = 1
Else
$Ping = 0
EndIf

EndFunction


;?"Testet Verbindung zu einem Host"
;?"IP Adresse: " Gets $ip

If ping("$ip")
; the host is reachable
?"erreichbar"
Else
; the host is not reachable
?"nicht erreichbar"
EndIf

Top
#146238 - 2005-08-25 01:02 PM Re: How can i check wether the DC iss accessible?
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Just like Lonkero says, use login scripts. if a DC is not available, there is no login script to run.
Top
#146239 - 2005-08-27 02:18 PM Re: How can i check wether the DC iss accessible?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See the UDF Forum for various PING-related UDFs.
_________________________
There are two types of vessels, submarines and targets.

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
0 registered and 823 anonymous users online.
Newest Members
JimDunn, fgarcia, Viginette, ManuvdWielNL, Sir_Barrington
17890 Registered Users

Generated in 0.06 seconds in which 0.024 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