How Do I Determine The Workstations Sharing Application From The Server?

Posted on 2005-04-06
Last Modified: 2010-04-17
Hi Friends,
    Please, Can anybody help me to get a simple code or API's file and it sample of program, that will always, automatically be checking the network for the numbers of workstations that are sharing the same application from the main server.
   I want my application on the main server to be able to detect the numbers of computers on the network that are sharing the same application from the server. And how I can automatically close the shared applications from the computer that is not eligable to open the application at limit.
   Once again, I will be too; very very grateful to get somebody to help me out of this task.
   I grateful u all.

Question by:efidtech
    LVL 13

    Accepted Solution

    I use a workaround for this in my apps, as there are many things that "could go wrong" or be different...

    Since I know the workstations are sharing data on the server (at least that's what they generally do :)), the program has a path to a data-directory on the server. I have the program open a file (I call it a "lock-file") for exclusive write access on the server (i.e. with the workstation name or a number, etc.). This file stays open while the application is running. When the application closes, I close the file. If I want to test how many applications are running, I just count the files that are currently open.

    This has worked quite well for me (for checking network licensing).

    I also add some sort of failsafe, to make sure licenses aren't getting stuck: i.e. when starting, check if the data is being shared already (try to open the data exclusively): if it is not being shared, then we are the first / only user: we can safely delete all remaining "lock-files". The server can also do this every now and then. Usually this is not required though, but it is better to test than to have the users complain about locked licenses.

    Also, if you use the "lock-files" on a workstation-basis (i.e. use the name of the workstation), the user can open the application several times on the same workstation without having the licenses decreased (if you want to allow this).

    LVL 13

    Expert Comment

    Which way did you choose? How'd it go? :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Suggested Solutions

    Title # Comments Views Activity
    Exchange and Third Party application. 8 45
    no14 challenge 14 46
    How to split this in C++ 4 48
    python question 5 36
    This is an explanation of a simple data model to help parse a JSON feed
    A short article about problems I had with the new location API and permissions in Marshmallow
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now