![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | determine if PC is on a certain network Trying to write a script that performs some actions based on whether the PC is connected to a particularly named network in our company, but I'm having trouble with the first part. The PC could be connected to one of several company networks--foo1, foo2, foo3, forinstance--or the PC could be not connected (laptop users connected to their home wireless network, for example). Is there VBscript that can tell me whether the PC is currently connected to foo1 or not? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: determine if PC is on a certain network "Tony Logan" <TonyLogan@xxxxxx> wrote in message news:9CDB781F-69ED-4689-8763-DF90DD6051CF@xxxxxx Quote: > Trying to write a script that performs some actions based on whether the > PC > is connected to a particularly named network in our company, but I'm > having > trouble with the first part. > > The PC could be connected to one of several company networks--foo1, foo2, > foo3, forinstance--or the PC could be not connected (laptop users > connected > to their home wireless network, for example). > > Is there VBscript that can tell me whether the PC is currently connected > to > foo1 or not? their %LogonServer%? Are the PCs in fact in a domain network or in a workgroup network? |
My System Specs![]() |
| | #3 (permalink) |
| | Re: determine if PC is on a certain network "Pegasus [MVP]" <news@xxxxxx> wrote in message news:%23BALaQZ1JHA.1644@xxxxxx Quote: > > "Tony Logan" <TonyLogan@xxxxxx> wrote in message > news:9CDB781F-69ED-4689-8763-DF90DD6051CF@xxxxxx Quote: >> Trying to write a script that performs some actions based on whether the >> PC >> is connected to a particularly named network in our company, but I'm >> having >> trouble with the first part. >> >> The PC could be connected to one of several company networks--foo1, foo2, >> foo3, forinstance--or the PC could be not connected (laptop users >> connected >> to their home wireless network, for example). >> >> Is there VBscript that can tell me whether the PC is currently connected >> to >> foo1 or not? > How can you tell if your PCs are connected to foo1? By their IP subnet? By > their %LogonServer%? Are the PCs in fact in a domain network or in a > workgroup network? USERDOMAIN has the value you want you can use the wshNetwork object to retrieve the value in a VBScript program. For example: Set objNetwork = CreateObject("Wscript.Network") strDomain = objNetwork.UserDomain -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
| | #4 (permalink) |
| | Re: determine if PC is on a certain network "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> wrote in message news:edjzija1JHA.4416@xxxxxx Quote: > > "Pegasus [MVP]" <news@xxxxxx> wrote in message > news:%23BALaQZ1JHA.1644@xxxxxx Quote: >> >> "Tony Logan" <TonyLogan@xxxxxx> wrote in message >> news:9CDB781F-69ED-4689-8763-DF90DD6051CF@xxxxxx Quote: >>> Trying to write a script that performs some actions based on whether the >>> PC >>> is connected to a particularly named network in our company, but I'm >>> having >>> trouble with the first part. >>> >>> The PC could be connected to one of several company networks--foo1, >>> foo2, >>> foo3, forinstance--or the PC could be not connected (laptop users >>> connected >>> to their home wireless network, for example). >>> >>> Is there VBscript that can tell me whether the PC is currently connected >>> to >>> foo1 or not? >> How can you tell if your PCs are connected to foo1? By their IP subnet? >> By their %LogonServer%? Are the PCs in fact in a domain network or in a >> workgroup network? > At a command prompt run the "Set" command to view environment variables. > If USERDOMAIN has the value you want you can use the wshNetwork object to > retrieve the value in a VBScript program. For example: one the workstation belonged to? /Al |
My System Specs![]() |
| | #5 (permalink) |
| | Re: determine if PC is on a certain network "Pegasus [MVP]" wrote: Quote: > How can you tell if your PCs are connected to foo1? By their IP subnet? By > their %LogonServer%? Are the PCs in fact in a domain network or in a > workgroup network? PC, I try to ping the domain server and set a boolean variable. If True, the PC is connected to that domain, and if False, it's not. Appears to be working so far in testing. Thanks for the help! |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| determine app is 32 or 64 bit | PowerShell | |||
| Determine PST Format | PowerShell | |||
| Determine the machine logon | PowerShell | |||
| Determine Network DHCP allocated IP addresses | Vista networking & sharing | |||
| API to determine if UAC is enabled? | Vista security | |||