Announcement

Collapse
No announcement yet.

Computer Identification

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Computer Identification

    Hello everyone.

    In a multi-user system I want to be able to identify the user
    who has locked a file for update for an unreasonable amount of
    time. What I need to do is use the computer name acquired by
    getting it using the "GetComputerName" function in the win32api.

    I am assuming that in Microsoft networks this will be a unique
    name. This assumption may be a mistake! If Windows is used
    under other networking software is this name of any value?
    If not, is there a way to obtain the station ID for Novell or
    others.

    I have searched the Novell web site for information about this
    without success. I have also searched this site with no success.
    May be my search keys?

    If anyone can answer my question or point me in the right
    direction it would be appreciated.

    I hope this is not a controversial question.

    Thanks,
    Larry

    ------------------
    Larry Coleman

    [This message has been edited by Larry Coleman (edited April 07, 2001).]
    Larry Coleman
    Savannah, Ga USA

  • #2
    Larry, this seems similar to the question I recently posted about
    obtaining lock info.

    How do you plan to determine which workstation has set the lock?



    ------------------
    Bernard Ertl
    Bernard Ertl
    InterPlan Systems

    Comment


    • #3
      I did this in DOS by very simple way. Because only my program could lock data set, I wrote own log on server and when guy A could not access data during x sec, I read log and informed A that data set is busy by guy B.



      ------------------
      E-MAIL: [email protected]

      Comment


      • #4
        Bern,

        I currently have what I call a flag file that tracks all files
        or records that are locked for update, add or delete. What I am
        doing now is generating a unique ID for each station that
        uses the system based on the time the system is started. This
        works fine but if a problem occurs, such as a user opening a
        record for update and going to lunch, the system knows the record
        is locked and reports the status correctly to the requesting
        user program. Using this method the second user does not know
        which station has the file locked. I would like to be able to
        tell the user who is locked out that "Mary's" (or whatever name
        is used) computer has exclusive access to record. This way
        something could be done before Mary gets back without having to
        check every computer on the network.

        The checking for adds and delete are no problem since locking
        and unlocking these are done at system speed. Only an action
        such as lightning strikes or power failures should affect these.

        Semen,

        I am basically doing what you suggest. The only question is can
        I acquire a unique ID without having the user logon to my system
        in addition to their normal logon?

        Thanks to both,
        Larry

        ------------------
        Larry Coleman
        [email protected]
        Larry Coleman
        Savannah, Ga USA

        Comment


        • #5
          GetComputerName + GetUserName ?

          ------------------
          E-MAIL: [email protected]

          Comment


          • #6
            Larry,

            GetComputerName + IP# will work as well. Just store it as a 32
            bit number.

            My MRP manufacturer uses a similar method, they create a .SEM file
            and store the user login name and mac address...



            ------------------
            -Greg
            -Greg
            [email protected]
            MCP,MCSA,MCSE,MCSD

            Comment


            • #7
              Larry,

              I once used something called 'WhoHasIt' (shareware), and a search on Google turned
              this up : http://statsware.ackind.net/whohasit/index.html . There was also a link
              to a similar-sounding but free utility on the Novell site at
              http://www.novell.com/coolsolutions/Assets/Whohasd.exe .

              If by any chance your issue is to do with a Jet (Access) mdb file, there's a free
              download from Microsoft called JetUtils.exe, which contains a small, non-ActiveX
              dll that does what you want.

              HTH

              ~~~

              Bern,

              HTH you too ! I missed your question on this subject.

              Cheers -

              Paul




              [This message has been edited by Paul Noble (edited April 07, 2001).]
              Zippety Software, Home of the Lynx Project Explorer
              http://www.zippety.net
              My e-mail

              Comment


              • #8
                Thanks to everyone.

                This will get me on track to the information I need.

                Thanks again,

                Larry

                ------------------
                Larry Coleman
                [email protected]
                Larry Coleman
                Savannah, Ga USA

                Comment


                • #9
                  Have you tried the "SET" command to list the environment variables
                  then parse the information you need?

                  That would be the OSes "SET" command.

                  ------------------
                  -John
                  e-mail: [email protected]

                  [This message has been edited by J. Armstrong (edited April 11, 2001).]

                  Comment


                  • #10
                    NT Resource kit and Win98 come wiht a tool called NetView, it shows you all this info already, pretty slick too....




                    Scott

                    ------------------
                    Scott
                    Scott Turchin
                    MCSE, MCP+I
                    http://www.tngbbs.com
                    ----------------------
                    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

                    Comment

                    Working...
                    X