Announcement

Collapse

New Sub-Forum

In an effort to help make sure there are appropriate categories for topics of discussion that are happening, there is now a sub-forum for databases and database programming under Special Interest groups. Please direct questions, etc., about this topic to that sub-forum moving forward. Thank you.
See more
See less

Determine Windows user Domain rights level

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

  • Determine Windows user Domain rights level

    I have a program that uses psfile from Microsoft to get the status of files
    in use by remote servers. It's primarily used to determine if all users are out of the system and a backup can be made or if someone's workstation hung with files open etc,etc.

    psfile doesn't seem to give the right information unless a Domain Administrator is running it. Is there an api to determine if the currently logged in windows user has Admin rights to the Domain or should I just always assume they don't and bring up a dialog and pass it as a parameter on the psfile command line?

    Bob Mechler

  • #2
    Hey Bob.

    What about this one from Semen... isAdmin

    Comment


    • #3
      Just curious if been updated to work with VISTA? or if any updates are needed?
      Engineer's Motto: If it aint broke take it apart and fix it

      "If at 1st you don't succeed... call it version 1.0"

      "Half of Programming is coding"....."The other 90% is DEBUGGING"

      "Document my code????" .... "WHYYY??? do you think they call it CODE? "

      Comment


      • #4
        I ran the sample and a slight typo showed up. It's .pSid instead of .sid.

        Mine is an XP machine.

        Bob Mechler

        Comment


        • #5
          The IsAdmin subroutine works in that it distinquishes between a Domain user and a Domain Admin. It seems that psfile can only report the user who has a file locked open if run by a Domain Admin.

          Is there any other way to determine what file is locked on a remote computer i.e. \\server and what user has it locked besides psfile?

          I'd like the person who is responsible for making a backup periodically (a domain user) during the day to be able to tell if a file is locked open by a process and who is running that process rather than tieing up the domain administrator's time.

          Also, when a domain user tries to run psfile at the command line with the username and password of a domain admin it doesn't succeed. Any thoughts on that?

          Bob Mechler

          Comment


          • #6
            Finding locked files on a server

            http://www.powerbasic.com/support/pb...hlight=InUseBy

            That code will show the files that are locked and which userid has them locked. If you need a program that will then look up that userid to get more details like the user name, etc, I think I have also posted some code that looks up userid information. I also have an extended version of the above file lock code that will then let you double click on the lock to show the userids information. (let me know if you want that version.)
            "I haven't lost my mind... its backed up on tape... I think??" :D

            Comment

            Working...
            X