|
Hi there...
The way I solved the "dash" ("-")-problem is written in the script below !
I could work with :
;*========================== If $RdvDom="name-tt111" goto "namett111" Endif
If $RdvDom="paas-ww253" goto "paas-ww253" Endif
;==========================
Etc. But If you've got 80 Domains for example...I think that this is a better way.
So see my script below...It works...But if you have a better (read smaller) method...let me know...The more possibilities you know the better, I always say !
Well see you !
Greetings Ro!
[SCRIPT] ;***************** ;* Check Domain * ;***************** :Domchk
$RdvDom = ReadValue("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSNP32\NetworkProvider","AuthenticatingAgent")
? "$$RdvDom = $Rdvdom"
If @error=0 $x = Instr($RdvDom,"-") ? "$$x = $x" If $x >0 ? "yes"
$x1=$x-1 $x2=$x+1
? "$$x1 = $x1" ? "$$x2 = $x2"
$sub1=substr($RdvDom,1,$x1) $sub2=substr($RdvDom,$x2,20)
? "$$sub1 = $sub1" ? "$$sub2 = $sub2"
$Domain = (($sub1)+($sub2)) ? "$$Domain = $Domain"
goto $Domain Endif
[END OF SCRIPT]
|