hello
i have two questions

1) can i with a vbs script (in a logon) determine on which site (AD) i m
connected ?
2) can i with a vbs script (in a logon) determine if i am on a TSE
precision i want a script who works with TSE 2000)

thanks
--
nt

Re: determine on which site i m connected and if i am on TSE by Richard

Richard
Fri Dec 07 06:41:21 PST 2007


"nicolas29" <nt29@community.nospam> wrote in message
news:C09A1375-F02A-478E-9155-02C09139431A@microsoft.com...
> hello
> i have two questions
>
> 1) can i with a vbs script (in a logon) determine on which site (AD) i m
> connected ?
> 2) can i with a vbs script (in a logon) determine if i am on a TSE
> precision i want a script who works with TSE 2000)

Use the ADSystemInfo object to find the site:
============
Set objSysInfo = CreateObject("ADSystemInfo")
strSite = objSysInfo.SiteName
Wscript.Echo "Site: " & strSite

--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--



Re: determine on which site i m connected and if i am on TSE by nt29

nt29
Fri Dec 07 06:58:01 PST 2007

thanks a lot richard

good days
--
nt


"Richard Mueller [MVP]" wrote:

>
> "nicolas29" <nt29@community.nospam> wrote in message
> news:C09A1375-F02A-478E-9155-02C09139431A@microsoft.com...
> > hello
> > i have two questions
> >
> > 1) can i with a vbs script (in a logon) determine on which site (AD) i m
> > connected ?
> > 2) can i with a vbs script (in a logon) determine if i am on a TSE
> > precision i want a script who works with TSE 2000)
>
> Use the ADSystemInfo object to find the site:
> ============
> Set objSysInfo = CreateObject("ADSystemInfo")
> strSite = objSysInfo.SiteName
> Wscript.Echo "Site: " & strSite
>
> --
> Richard Mueller
> Microsoft MVP Scripting and ADSI
> Hilltop Lab - http://www.rlmueller.net
> --
>
>
>

Re: determine on which site i m connected and if i am on TSE by billy

billy
Sat Dec 08 19:01:47 PST 2007

> > > 2) can i with a vbs script (in a logon) determine if i am on a TSE

in TSE, the SessionName environment variable has a specific format
(something like "rdp-tcp" if i remember correctly - you should check)

Set WshShell = WScript.CreateObject("WScript.Shell")
Set objEnv = wshShell.Environment ("VOLATILE")
If InStr(objEnv("SESSIONNAME"), "rdp-tcp") Then ....

Re: determine on which site i m connected and if i am on TSE by nt29

nt29
Tue Dec 18 15:05:03 CST 2007

thanks billy i just see your answer

--
nt


"billy" wrote:

> > > > 2) can i with a vbs script (in a logon) determine if i am on a TSE
>
> in TSE, the SessionName environment variable has a specific format
> (something like "rdp-tcp" if i remember correctly - you should check)
>
> Set WshShell = WScript.CreateObject("WScript.Shell")
> Set objEnv = wshShell.Environment ("VOLATILE")
> If InStr(objEnv("SESSIONNAME"), "rdp-tcp") Then ....
>