DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Page 1 of 4 123 ... LastLast
Results 1 to 15 of 51

Thread: How to Detect if a Remote Computer is logged on?

  1. #1
    Tor Arne Nilsen Guest

    How to Detect if a Remote Computer is logged on?

    Is there a way to check if a remote Win2K computer is logged on?
    The purpose is to see if computers are ocupied or if they are "free" for
    access...





  2. #2
    L.J. Johnson Guest

    Re: How to Detect if a Remote Computer is logged on?

    Tor,

    > Is there a way to check if a remote Win2K computer is logged on?
    > The purpose is to see if computers are ocupied or if they are "free" for
    > access...


    I don't know of a way. If you had a small ActiveX exe running on each
    machine, I can think of a couple of possibilities. And, the NetWkstaUserEnum
    looks interesting (I haven't used this particular API) --

    "The NetWkstaUserEnum function lists information about all users currently
    logged on to the workstation. This list includes interactive, service and
    batch logons."

    However, it doesn't give a way to distinguish between the various users.
    Bummer.

    --
    L.J. Johnson, Slightly Tilted Software
    Microsoft MVP (Visual Basic)
    LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    <http://www.SlightlyTiltedSoftware.com>
    Ask The NT Pro at <http://www.devx.com/gethelp>




  3. #3
    L.J. Johnson Guest

    Re: How to Detect if a Remote Computer is logged on?

    Tor,

    > Is there a way to check if a remote Win2K computer is logged on?
    > The purpose is to see if computers are ocupied or if they are "free" for
    > access...


    I don't know of a way. If you had a small ActiveX exe running on each
    machine, I can think of a couple of possibilities. And, the NetWkstaUserEnum
    looks interesting (I haven't used this particular API) --

    "The NetWkstaUserEnum function lists information about all users currently
    logged on to the workstation. This list includes interactive, service and
    batch logons."

    However, it doesn't give a way to distinguish between the various users.
    Bummer.

    --
    L.J. Johnson, Slightly Tilted Software
    Microsoft MVP (Visual Basic)
    LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    <http://www.SlightlyTiltedSoftware.com>
    Ask The NT Pro at <http://www.devx.com/gethelp>




  4. #4
    Ben Neville Guest

    Re: How to Detect if a Remote Computer is logged on?

    Tor,

    Here is one possibility.

    Enumerate the registry sub keys (SIDS) contained under HKEY_USERS. In each
    sub key look for a key called "Volatile Environment".

    Those with this value should belong to interactively logged on users. Those
    without this key are normally service or batch jobs.

    Hence if you find a volatile environment section there would normally be an
    interactively logged on user. This can easily be done remotely.

    From what I have seen this works on NT4.0. I am not 100 % sure about on
    Win2K but it could be worth a shot.

    Rgds
    Ben


    "L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote in message
    news:3b696b4b@news.devx.com...
    > Tor,
    >
    > > Is there a way to check if a remote Win2K computer is logged on?
    > > The purpose is to see if computers are ocupied or if they are "free" for
    > > access...

    >
    > I don't know of a way. If you had a small ActiveX exe running on each
    > machine, I can think of a couple of possibilities. And, the

    NetWkstaUserEnum
    > looks interesting (I haven't used this particular API) --
    >
    > "The NetWkstaUserEnum function lists information about all users currently
    > logged on to the workstation. This list includes interactive, service and
    > batch logons."
    >
    > However, it doesn't give a way to distinguish between the various users.
    > Bummer.
    >
    > --
    > L.J. Johnson, Slightly Tilted Software
    > Microsoft MVP (Visual Basic)
    > LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    > <http://www.SlightlyTiltedSoftware.com>
    > Ask The NT Pro at <http://www.devx.com/gethelp>
    >
    >
    >




  5. #5
    Ben Neville Guest

    Re: How to Detect if a Remote Computer is logged on?

    Tor,

    Here is one possibility.

    Enumerate the registry sub keys (SIDS) contained under HKEY_USERS. In each
    sub key look for a key called "Volatile Environment".

    Those with this value should belong to interactively logged on users. Those
    without this key are normally service or batch jobs.

    Hence if you find a volatile environment section there would normally be an
    interactively logged on user. This can easily be done remotely.

    From what I have seen this works on NT4.0. I am not 100 % sure about on
    Win2K but it could be worth a shot.

    Rgds
    Ben


    "L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote in message
    news:3b696b4b@news.devx.com...
    > Tor,
    >
    > > Is there a way to check if a remote Win2K computer is logged on?
    > > The purpose is to see if computers are ocupied or if they are "free" for
    > > access...

    >
    > I don't know of a way. If you had a small ActiveX exe running on each
    > machine, I can think of a couple of possibilities. And, the

    NetWkstaUserEnum
    > looks interesting (I haven't used this particular API) --
    >
    > "The NetWkstaUserEnum function lists information about all users currently
    > logged on to the workstation. This list includes interactive, service and
    > batch logons."
    >
    > However, it doesn't give a way to distinguish between the various users.
    > Bummer.
    >
    > --
    > L.J. Johnson, Slightly Tilted Software
    > Microsoft MVP (Visual Basic)
    > LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    > <http://www.SlightlyTiltedSoftware.com>
    > Ask The NT Pro at <http://www.devx.com/gethelp>
    >
    >
    >




  6. #6
    Tor Arne Nilsen Guest

    Re: How to Detect if a Remote Computer is logged on?

    Ben,

    It looks like this will work. I have bin going through the HKEY_USERS and it
    is the same as in NT4.0.
    Is there a eazy way to implement this check as a service on a WinNT/Win2K
    computer. Implementation of this as a DLL should not be so hard, but the
    eazyest way to do this should be through a service. But im not shure how I
    should get this to work.

    Any ideas?

    Rgds,
    Tor Arne Nilsen


    "Ben Neville" <bneville@programmer.net> wrote in message
    news:3b6a0d27$1@news.devx.com...
    > Tor,
    >
    > Here is one possibility.
    >
    > Enumerate the registry sub keys (SIDS) contained under HKEY_USERS. In each
    > sub key look for a key called "Volatile Environment".
    >
    > Those with this value should belong to interactively logged on users.

    Those
    > without this key are normally service or batch jobs.
    >
    > Hence if you find a volatile environment section there would normally be

    an
    > interactively logged on user. This can easily be done remotely.
    >
    > From what I have seen this works on NT4.0. I am not 100 % sure about on
    > Win2K but it could be worth a shot.
    >
    > Rgds
    > Ben
    >
    >
    > "L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote in message
    > news:3b696b4b@news.devx.com...
    > > Tor,
    > >
    > > > Is there a way to check if a remote Win2K computer is logged on?
    > > > The purpose is to see if computers are ocupied or if they are "free"

    for
    > > > access...

    > >
    > > I don't know of a way. If you had a small ActiveX exe running on each
    > > machine, I can think of a couple of possibilities. And, the

    > NetWkstaUserEnum
    > > looks interesting (I haven't used this particular API) --
    > >
    > > "The NetWkstaUserEnum function lists information about all users

    currently
    > > logged on to the workstation. This list includes interactive, service

    and
    > > batch logons."
    > >
    > > However, it doesn't give a way to distinguish between the various users.
    > > Bummer.
    > >
    > > --
    > > L.J. Johnson, Slightly Tilted Software
    > > Microsoft MVP (Visual Basic)
    > > LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    > > <http://www.SlightlyTiltedSoftware.com>
    > > Ask The NT Pro at <http://www.devx.com/gethelp>
    > >
    > >
    > >

    >
    >




  7. #7
    Tor Arne Nilsen Guest

    Re: How to Detect if a Remote Computer is logged on?

    Ben,

    It looks like this will work. I have bin going through the HKEY_USERS and it
    is the same as in NT4.0.
    Is there a eazy way to implement this check as a service on a WinNT/Win2K
    computer. Implementation of this as a DLL should not be so hard, but the
    eazyest way to do this should be through a service. But im not shure how I
    should get this to work.

    Any ideas?

    Rgds,
    Tor Arne Nilsen


    "Ben Neville" <bneville@programmer.net> wrote in message
    news:3b6a0d27$1@news.devx.com...
    > Tor,
    >
    > Here is one possibility.
    >
    > Enumerate the registry sub keys (SIDS) contained under HKEY_USERS. In each
    > sub key look for a key called "Volatile Environment".
    >
    > Those with this value should belong to interactively logged on users.

    Those
    > without this key are normally service or batch jobs.
    >
    > Hence if you find a volatile environment section there would normally be

    an
    > interactively logged on user. This can easily be done remotely.
    >
    > From what I have seen this works on NT4.0. I am not 100 % sure about on
    > Win2K but it could be worth a shot.
    >
    > Rgds
    > Ben
    >
    >
    > "L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote in message
    > news:3b696b4b@news.devx.com...
    > > Tor,
    > >
    > > > Is there a way to check if a remote Win2K computer is logged on?
    > > > The purpose is to see if computers are ocupied or if they are "free"

    for
    > > > access...

    > >
    > > I don't know of a way. If you had a small ActiveX exe running on each
    > > machine, I can think of a couple of possibilities. And, the

    > NetWkstaUserEnum
    > > looks interesting (I haven't used this particular API) --
    > >
    > > "The NetWkstaUserEnum function lists information about all users

    currently
    > > logged on to the workstation. This list includes interactive, service

    and
    > > batch logons."
    > >
    > > However, it doesn't give a way to distinguish between the various users.
    > > Bummer.
    > >
    > > --
    > > L.J. Johnson, Slightly Tilted Software
    > > Microsoft MVP (Visual Basic)
    > > LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    > > <http://www.SlightlyTiltedSoftware.com>
    > > Ask The NT Pro at <http://www.devx.com/gethelp>
    > >
    > >
    > >

    >
    >




  8. #8
    L.J. Johnson Guest

    Re: How to Detect if a Remote Computer is logged on?

    Tor,

    > Is there a eazy way to implement this check as a service on a WinNT/Win2K
    > computer. Implementation of this as a DLL should not be so hard, but the
    > eazyest way to do this should be through a service. But im not shure how I
    > should get this to work.


    There are several alternatives to creating a service with Visual Basic.

    (1) Use VB 5.0 and get my code to create a native VB service (on my web
    site, below).

    (2) Use VB 6.0 with my code, but write a TypeLib to replace *all* the API
    calls, and make sure that none of the TypeLib declarations refer to the last
    error.

    (3) Use SvrAny to create a wrapper around your EXE that allows it to run as
    a service. Very limited, and a last resort (IMHO).

    (4) Use the unsupported MS OCX, NTSVC.ocx (limited, but useful in some
    cases) -- the compiled version is on both the Fawcette and my web site, and
    the uncompiled version in on MS's site. Could be an adequate solution if you
    create a *tiny* service with the OCX, and have the service call your current
    code. I.E., minimize the changes to your current working code.

    (5) Write it in some other language (C++, etc). Useful if you have a C++
    person on staff.

    (6) Wait for VB.Net, where it's really quite trivial

    (7) Or, my recommended way, get the Services Toolkit from Desaware. I've
    used it on a couple of projects, and it's quite good. With the Toolkit, you
    have to learn the frameworks that comes with the tool -- not hard, but an
    overhead nonetheless.

    --
    L.J. Johnson, Slightly Tilted Software
    Microsoft MVP (Visual Basic)
    LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    <http://www.SlightlyTiltedSoftware.com>
    Ask The NT Pro at <http://www.devx.com/gethelp>




  9. #9
    L.J. Johnson Guest

    Re: How to Detect if a Remote Computer is logged on?

    Tor,

    > Is there a eazy way to implement this check as a service on a WinNT/Win2K
    > computer. Implementation of this as a DLL should not be so hard, but the
    > eazyest way to do this should be through a service. But im not shure how I
    > should get this to work.


    There are several alternatives to creating a service with Visual Basic.

    (1) Use VB 5.0 and get my code to create a native VB service (on my web
    site, below).

    (2) Use VB 6.0 with my code, but write a TypeLib to replace *all* the API
    calls, and make sure that none of the TypeLib declarations refer to the last
    error.

    (3) Use SvrAny to create a wrapper around your EXE that allows it to run as
    a service. Very limited, and a last resort (IMHO).

    (4) Use the unsupported MS OCX, NTSVC.ocx (limited, but useful in some
    cases) -- the compiled version is on both the Fawcette and my web site, and
    the uncompiled version in on MS's site. Could be an adequate solution if you
    create a *tiny* service with the OCX, and have the service call your current
    code. I.E., minimize the changes to your current working code.

    (5) Write it in some other language (C++, etc). Useful if you have a C++
    person on staff.

    (6) Wait for VB.Net, where it's really quite trivial

    (7) Or, my recommended way, get the Services Toolkit from Desaware. I've
    used it on a couple of projects, and it's quite good. With the Toolkit, you
    have to learn the frameworks that comes with the tool -- not hard, but an
    overhead nonetheless.

    --
    L.J. Johnson, Slightly Tilted Software
    Microsoft MVP (Visual Basic)
    LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    <http://www.SlightlyTiltedSoftware.com>
    Ask The NT Pro at <http://www.devx.com/gethelp>




  10. #10
    Ben Neville Guest

    Re: How to Detect if a Remote Computer is logged on?

    Tor,

    If you provide a clear description of what you are looking to achieve we
    could give a better recommendation here.

    E.G. If you want to create a program to use on a supervisor type computer
    that you can run on demand then why not just create a program that connects
    to each PC in turn and then returns the results. This could be via a web
    page.
    If you want code that sits there and constantly updates with machines as
    they become free you could use a service type approach which would run on
    each PC and then make some sort of notification call to supervisor
    application which shows where the free seats are when a seat changes status.
    I would think this is significantly more work but it would probably scale
    better if you want to monitor hundreds of PCs.

    Let us know the scope of the problems and the desired behaviour of you are
    looking to achieve so we can advise what approach would work best.

    Rgds
    Ben

    "Tor Arne Nilsen" <tor.arne.nilsen@vbsoftdev.net> wrote in message
    news:3b6a3e14@news.devx.com...
    > Ben,
    >
    > It looks like this will work. I have bin going through the HKEY_USERS and

    it
    > is the same as in NT4.0.
    > Is there a eazy way to implement this check as a service on a WinNT/Win2K
    > computer. Implementation of this as a DLL should not be so hard, but the
    > eazyest way to do this should be through a service. But im not shure how I
    > should get this to work.
    >
    > Any ideas?
    >
    > Rgds,
    > Tor Arne Nilsen
    >
    >
    > "Ben Neville" <bneville@programmer.net> wrote in message
    > news:3b6a0d27$1@news.devx.com...
    > > Tor,
    > >
    > > Here is one possibility.
    > >
    > > Enumerate the registry sub keys (SIDS) contained under HKEY_USERS. In

    each
    > > sub key look for a key called "Volatile Environment".
    > >
    > > Those with this value should belong to interactively logged on users.

    > Those
    > > without this key are normally service or batch jobs.
    > >
    > > Hence if you find a volatile environment section there would normally be

    > an
    > > interactively logged on user. This can easily be done remotely.
    > >
    > > From what I have seen this works on NT4.0. I am not 100 % sure about on
    > > Win2K but it could be worth a shot.
    > >
    > > Rgds
    > > Ben
    > >
    > >
    > > "L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote in message
    > > news:3b696b4b@news.devx.com...
    > > > Tor,
    > > >
    > > > > Is there a way to check if a remote Win2K computer is logged on?
    > > > > The purpose is to see if computers are ocupied or if they are "free"

    > for
    > > > > access...
    > > >
    > > > I don't know of a way. If you had a small ActiveX exe running on each
    > > > machine, I can think of a couple of possibilities. And, the

    > > NetWkstaUserEnum
    > > > looks interesting (I haven't used this particular API) --
    > > >
    > > > "The NetWkstaUserEnum function lists information about all users

    > currently
    > > > logged on to the workstation. This list includes interactive, service

    > and
    > > > batch logons."
    > > >
    > > > However, it doesn't give a way to distinguish between the various

    users.
    > > > Bummer.
    > > >
    > > > --
    > > > L.J. Johnson, Slightly Tilted Software
    > > > Microsoft MVP (Visual Basic)
    > > > LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    > > > <http://www.SlightlyTiltedSoftware.com>
    > > > Ask The NT Pro at <http://www.devx.com/gethelp>
    > > >
    > > >
    > > >

    > >
    > >

    >
    >




  11. #11
    Ben Neville Guest

    Re: How to Detect if a Remote Computer is logged on?

    Tor,

    If you provide a clear description of what you are looking to achieve we
    could give a better recommendation here.

    E.G. If you want to create a program to use on a supervisor type computer
    that you can run on demand then why not just create a program that connects
    to each PC in turn and then returns the results. This could be via a web
    page.
    If you want code that sits there and constantly updates with machines as
    they become free you could use a service type approach which would run on
    each PC and then make some sort of notification call to supervisor
    application which shows where the free seats are when a seat changes status.
    I would think this is significantly more work but it would probably scale
    better if you want to monitor hundreds of PCs.

    Let us know the scope of the problems and the desired behaviour of you are
    looking to achieve so we can advise what approach would work best.

    Rgds
    Ben

    "Tor Arne Nilsen" <tor.arne.nilsen@vbsoftdev.net> wrote in message
    news:3b6a3e14@news.devx.com...
    > Ben,
    >
    > It looks like this will work. I have bin going through the HKEY_USERS and

    it
    > is the same as in NT4.0.
    > Is there a eazy way to implement this check as a service on a WinNT/Win2K
    > computer. Implementation of this as a DLL should not be so hard, but the
    > eazyest way to do this should be through a service. But im not shure how I
    > should get this to work.
    >
    > Any ideas?
    >
    > Rgds,
    > Tor Arne Nilsen
    >
    >
    > "Ben Neville" <bneville@programmer.net> wrote in message
    > news:3b6a0d27$1@news.devx.com...
    > > Tor,
    > >
    > > Here is one possibility.
    > >
    > > Enumerate the registry sub keys (SIDS) contained under HKEY_USERS. In

    each
    > > sub key look for a key called "Volatile Environment".
    > >
    > > Those with this value should belong to interactively logged on users.

    > Those
    > > without this key are normally service or batch jobs.
    > >
    > > Hence if you find a volatile environment section there would normally be

    > an
    > > interactively logged on user. This can easily be done remotely.
    > >
    > > From what I have seen this works on NT4.0. I am not 100 % sure about on
    > > Win2K but it could be worth a shot.
    > >
    > > Rgds
    > > Ben
    > >
    > >
    > > "L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote in message
    > > news:3b696b4b@news.devx.com...
    > > > Tor,
    > > >
    > > > > Is there a way to check if a remote Win2K computer is logged on?
    > > > > The purpose is to see if computers are ocupied or if they are "free"

    > for
    > > > > access...
    > > >
    > > > I don't know of a way. If you had a small ActiveX exe running on each
    > > > machine, I can think of a couple of possibilities. And, the

    > > NetWkstaUserEnum
    > > > looks interesting (I haven't used this particular API) --
    > > >
    > > > "The NetWkstaUserEnum function lists information about all users

    > currently
    > > > logged on to the workstation. This list includes interactive, service

    > and
    > > > batch logons."
    > > >
    > > > However, it doesn't give a way to distinguish between the various

    users.
    > > > Bummer.
    > > >
    > > > --
    > > > L.J. Johnson, Slightly Tilted Software
    > > > Microsoft MVP (Visual Basic)
    > > > LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    > > > <http://www.SlightlyTiltedSoftware.com>
    > > > Ask The NT Pro at <http://www.devx.com/gethelp>
    > > >
    > > >
    > > >

    > >
    > >

    >
    >




  12. #12
    Tor Arne Nilsen Guest

    Re: How to Detect if a Remote Computer is logged on?

    Ben,
    The plan with the project is to finally get a WEB Page to display witch
    computers that are in use and witch that is free. It is supposed to be used
    in a Education Organization that will be providing it as a extra service for
    the students. I wan't them to be able to see if there is computers that are
    available for them or if all computers are in use for the moment.

    I know that there is some pearl code out there that can do this but finding
    it is not to eazy, and specialy when i don't know anything about pearl.

    Rgds
    Tor Arne Nilsen

    "Ben Neville" <bneville@programmer.net> wrote in message
    news:3b6b62e8@news.devx.com...
    > Tor,
    >
    > If you provide a clear description of what you are looking to achieve we
    > could give a better recommendation here.
    >
    > E.G. If you want to create a program to use on a supervisor type computer
    > that you can run on demand then why not just create a program that

    connects
    > to each PC in turn and then returns the results. This could be via a web
    > page.
    > If you want code that sits there and constantly updates with machines as
    > they become free you could use a service type approach which would run on
    > each PC and then make some sort of notification call to supervisor
    > application which shows where the free seats are when a seat changes

    status.
    > I would think this is significantly more work but it would probably scale
    > better if you want to monitor hundreds of PCs.
    >
    > Let us know the scope of the problems and the desired behaviour of you are
    > looking to achieve so we can advise what approach would work best.
    >
    > Rgds
    > Ben
    >
    > "Tor Arne Nilsen" <tor.arne.nilsen@vbsoftdev.net> wrote in message
    > news:3b6a3e14@news.devx.com...
    > > Ben,
    > >
    > > It looks like this will work. I have bin going through the HKEY_USERS

    and
    > it
    > > is the same as in NT4.0.
    > > Is there a eazy way to implement this check as a service on a

    WinNT/Win2K
    > > computer. Implementation of this as a DLL should not be so hard, but the
    > > eazyest way to do this should be through a service. But im not shure how

    I
    > > should get this to work.
    > >
    > > Any ideas?
    > >
    > > Rgds,
    > > Tor Arne Nilsen
    > >
    > >
    > > "Ben Neville" <bneville@programmer.net> wrote in message
    > > news:3b6a0d27$1@news.devx.com...
    > > > Tor,
    > > >
    > > > Here is one possibility.
    > > >
    > > > Enumerate the registry sub keys (SIDS) contained under HKEY_USERS. In

    > each
    > > > sub key look for a key called "Volatile Environment".
    > > >
    > > > Those with this value should belong to interactively logged on users.

    > > Those
    > > > without this key are normally service or batch jobs.
    > > >
    > > > Hence if you find a volatile environment section there would normally

    be
    > > an
    > > > interactively logged on user. This can easily be done remotely.
    > > >
    > > > From what I have seen this works on NT4.0. I am not 100 % sure about

    on
    > > > Win2K but it could be worth a shot.
    > > >
    > > > Rgds
    > > > Ben
    > > >
    > > >
    > > > "L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote in message
    > > > news:3b696b4b@news.devx.com...
    > > > > Tor,
    > > > >
    > > > > > Is there a way to check if a remote Win2K computer is logged on?
    > > > > > The purpose is to see if computers are ocupied or if they are

    "free"
    > > for
    > > > > > access...
    > > > >
    > > > > I don't know of a way. If you had a small ActiveX exe running on

    each
    > > > > machine, I can think of a couple of possibilities. And, the
    > > > NetWkstaUserEnum
    > > > > looks interesting (I haven't used this particular API) --
    > > > >
    > > > > "The NetWkstaUserEnum function lists information about all users

    > > currently
    > > > > logged on to the workstation. This list includes interactive,

    service
    > > and
    > > > > batch logons."
    > > > >
    > > > > However, it doesn't give a way to distinguish between the various

    > users.
    > > > > Bummer.
    > > > >
    > > > > --
    > > > > L.J. Johnson, Slightly Tilted Software
    > > > > Microsoft MVP (Visual Basic)
    > > > > LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    > > > > <http://www.SlightlyTiltedSoftware.com>
    > > > > Ask The NT Pro at <http://www.devx.com/gethelp>
    > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >




  13. #13
    Tor Arne Nilsen Guest

    Re: How to Detect if a Remote Computer is logged on?

    Ben,
    The plan with the project is to finally get a WEB Page to display witch
    computers that are in use and witch that is free. It is supposed to be used
    in a Education Organization that will be providing it as a extra service for
    the students. I wan't them to be able to see if there is computers that are
    available for them or if all computers are in use for the moment.

    I know that there is some pearl code out there that can do this but finding
    it is not to eazy, and specialy when i don't know anything about pearl.

    Rgds
    Tor Arne Nilsen

    "Ben Neville" <bneville@programmer.net> wrote in message
    news:3b6b62e8@news.devx.com...
    > Tor,
    >
    > If you provide a clear description of what you are looking to achieve we
    > could give a better recommendation here.
    >
    > E.G. If you want to create a program to use on a supervisor type computer
    > that you can run on demand then why not just create a program that

    connects
    > to each PC in turn and then returns the results. This could be via a web
    > page.
    > If you want code that sits there and constantly updates with machines as
    > they become free you could use a service type approach which would run on
    > each PC and then make some sort of notification call to supervisor
    > application which shows where the free seats are when a seat changes

    status.
    > I would think this is significantly more work but it would probably scale
    > better if you want to monitor hundreds of PCs.
    >
    > Let us know the scope of the problems and the desired behaviour of you are
    > looking to achieve so we can advise what approach would work best.
    >
    > Rgds
    > Ben
    >
    > "Tor Arne Nilsen" <tor.arne.nilsen@vbsoftdev.net> wrote in message
    > news:3b6a3e14@news.devx.com...
    > > Ben,
    > >
    > > It looks like this will work. I have bin going through the HKEY_USERS

    and
    > it
    > > is the same as in NT4.0.
    > > Is there a eazy way to implement this check as a service on a

    WinNT/Win2K
    > > computer. Implementation of this as a DLL should not be so hard, but the
    > > eazyest way to do this should be through a service. But im not shure how

    I
    > > should get this to work.
    > >
    > > Any ideas?
    > >
    > > Rgds,
    > > Tor Arne Nilsen
    > >
    > >
    > > "Ben Neville" <bneville@programmer.net> wrote in message
    > > news:3b6a0d27$1@news.devx.com...
    > > > Tor,
    > > >
    > > > Here is one possibility.
    > > >
    > > > Enumerate the registry sub keys (SIDS) contained under HKEY_USERS. In

    > each
    > > > sub key look for a key called "Volatile Environment".
    > > >
    > > > Those with this value should belong to interactively logged on users.

    > > Those
    > > > without this key are normally service or batch jobs.
    > > >
    > > > Hence if you find a volatile environment section there would normally

    be
    > > an
    > > > interactively logged on user. This can easily be done remotely.
    > > >
    > > > From what I have seen this works on NT4.0. I am not 100 % sure about

    on
    > > > Win2K but it could be worth a shot.
    > > >
    > > > Rgds
    > > > Ben
    > > >
    > > >
    > > > "L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote in message
    > > > news:3b696b4b@news.devx.com...
    > > > > Tor,
    > > > >
    > > > > > Is there a way to check if a remote Win2K computer is logged on?
    > > > > > The purpose is to see if computers are ocupied or if they are

    "free"
    > > for
    > > > > > access...
    > > > >
    > > > > I don't know of a way. If you had a small ActiveX exe running on

    each
    > > > > machine, I can think of a couple of possibilities. And, the
    > > > NetWkstaUserEnum
    > > > > looks interesting (I haven't used this particular API) --
    > > > >
    > > > > "The NetWkstaUserEnum function lists information about all users

    > > currently
    > > > > logged on to the workstation. This list includes interactive,

    service
    > > and
    > > > > batch logons."
    > > > >
    > > > > However, it doesn't give a way to distinguish between the various

    > users.
    > > > > Bummer.
    > > > >
    > > > > --
    > > > > L.J. Johnson, Slightly Tilted Software
    > > > > Microsoft MVP (Visual Basic)
    > > > > LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    > > > > <http://www.SlightlyTiltedSoftware.com>
    > > > > Ask The NT Pro at <http://www.devx.com/gethelp>
    > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >




  14. #14
    L.J. Johnson Guest

    Re: How to Detect if a Remote Computer is logged on?

    Ben,

    > Enumerate the registry sub keys (SIDS) contained under HKEY_USERS. In each
    > sub key look for a key called "Volatile Environment".
    >
    > Those with this value should belong to interactively logged on users.

    Those
    > without this key are normally service or batch jobs.


    Just checked on my W2k network. Logged off one of the W2K workstations.
    However, the registry still shows the "Volatile Environment" subkey. So, it
    looks like this will show that a particular user is an interactive user, but
    not whether that particular user is logged on (which, AFAIK, was the point
    of the original question -- i.e, whether *any* interactive users were logged
    in currently).

    --
    L.J. Johnson, Slightly Tilted Software
    Microsoft MVP (Visual Basic)
    LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    <http://www.SlightlyTiltedSoftware.com>
    Ask The NT Pro at <http://www.devx.com/gethelp>

    "Ben Neville" <bneville@programmer.net> wrote in message
    news:3b6a0d27$1@news.devx.com...
    > Tor,
    >
    > Here is one possibility.
    >
    >
    > Hence if you find a volatile environment section there would normally be

    an
    > interactively logged on user. This can easily be done remotely.
    >
    > From what I have seen this works on NT4.0. I am not 100 % sure about on
    > Win2K but it could be worth a shot.
    >
    > Rgds
    > Ben
    >
    >
    > "L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote in message
    > news:3b696b4b@news.devx.com...
    > > Tor,
    > >
    > > > Is there a way to check if a remote Win2K computer is logged on?
    > > > The purpose is to see if computers are ocupied or if they are "free"

    for
    > > > access...

    > >
    > > I don't know of a way. If you had a small ActiveX exe running on each
    > > machine, I can think of a couple of possibilities. And, the

    > NetWkstaUserEnum
    > > looks interesting (I haven't used this particular API) --
    > >
    > > "The NetWkstaUserEnum function lists information about all users

    currently
    > > logged on to the workstation. This list includes interactive, service

    and
    > > batch logons."
    > >
    > > However, it doesn't give a way to distinguish between the various users.
    > > Bummer.
    > >
    > > --
    > > L.J. Johnson, Slightly Tilted Software
    > > Microsoft MVP (Visual Basic)
    > > LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    > > <http://www.SlightlyTiltedSoftware.com>
    > > Ask The NT Pro at <http://www.devx.com/gethelp>
    > >
    > >
    > >

    >
    >




  15. #15
    L.J. Johnson Guest

    Re: How to Detect if a Remote Computer is logged on?

    Ben,

    > Enumerate the registry sub keys (SIDS) contained under HKEY_USERS. In each
    > sub key look for a key called "Volatile Environment".
    >
    > Those with this value should belong to interactively logged on users.

    Those
    > without this key are normally service or batch jobs.


    Just checked on my W2k network. Logged off one of the W2K workstations.
    However, the registry still shows the "Volatile Environment" subkey. So, it
    looks like this will show that a particular user is an interactive user, but
    not whether that particular user is logged on (which, AFAIK, was the point
    of the original question -- i.e, whether *any* interactive users were logged
    in currently).

    --
    L.J. Johnson, Slightly Tilted Software
    Microsoft MVP (Visual Basic)
    LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    <http://www.SlightlyTiltedSoftware.com>
    Ask The NT Pro at <http://www.devx.com/gethelp>

    "Ben Neville" <bneville@programmer.net> wrote in message
    news:3b6a0d27$1@news.devx.com...
    > Tor,
    >
    > Here is one possibility.
    >
    >
    > Hence if you find a volatile environment section there would normally be

    an
    > interactively logged on user. This can easily be done remotely.
    >
    > From what I have seen this works on NT4.0. I am not 100 % sure about on
    > Win2K but it could be worth a shot.
    >
    > Rgds
    > Ben
    >
    >
    > "L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote in message
    > news:3b696b4b@news.devx.com...
    > > Tor,
    > >
    > > > Is there a way to check if a remote Win2K computer is logged on?
    > > > The purpose is to see if computers are ocupied or if they are "free"

    for
    > > > access...

    > >
    > > I don't know of a way. If you had a small ActiveX exe running on each
    > > machine, I can think of a couple of possibilities. And, the

    > NetWkstaUserEnum
    > > looks interesting (I haven't used this particular API) --
    > >
    > > "The NetWkstaUserEnum function lists information about all users

    currently
    > > logged on to the workstation. This list includes interactive, service

    and
    > > batch logons."
    > >
    > > However, it doesn't give a way to distinguish between the various users.
    > > Bummer.
    > >
    > > --
    > > L.J. Johnson, Slightly Tilted Software
    > > Microsoft MVP (Visual Basic)
    > > LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    > > <http://www.SlightlyTiltedSoftware.com>
    > > Ask The NT Pro at <http://www.devx.com/gethelp>
    > >
    > >
    > >

    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center