Re: How do I keep an application from being started morethan once?

Here are some quick ideas. None of them should be too hard to implement,
although each has some drawbacks.
1. Have a login server track who is logged on, and if there is already a
logon for a given user or a given machine, then deny the application
startup. The nice thing about this is that a user will not be able to have
multiple logins even by going to another machine. Then again, this may not
be so nice, and you also get a possible single point of failure on the
login server for which you will have to prepare.
2. Drop to the operating system, and get a list of processes for the client
machine. If the name of one of them matches the name of application that
is being run, then deny startup. This avoids a network hit, but requires
some OS specific code. Also, a clever user could change the name of an
executable to get around this. Note that a user could have another login
on another machine.
3. Write to a file on the local machine. You can hide the file in some
suitable place, and can also scramble some information so that a user
cannot get around having this file present by reading from the file at
startup and then writing to it. Based on the state of your application,
the file will have some scrambled information indicating if an instance of
an application can be started. If you retain the write lock (i.e. do not
close) the file for the duration of the application, you increase your
security at the risk of a confused user if the application gets terminated
without releasing the lock. Depending on the OS where the client will run,
this could be an issue. If you like this option, perform some experiments
first on all configurations of an example client machine to determine the
behavior. Again, this only works to prevent an extra login on a single
machine, not system wide.
If you are not concerned about your users hacking around too much and don't
care about a login on another machine, I would opt for some version of
number 3. Otherwise, I would venture number 1.
Regards
CSB
At 07:47 AM 2/18/98 -0500, Martin G Nystrom wrote:
A user can launch an application, then launch it again. How do we make it so
that the user can only run one instance of the application?
Martin Nystrom
Eli Lilly and Company
([email protected])
Curtis Bragdon, Senior Consultant, Forte Software
[email protected]
Voice Mail: (510) 986-3807
Paging: (888) 687-6723
"I've seen dozens of triggering towns." - Richard Hugo

Yet another quick and dirty solution is to use local ExternalConnections.
This is a single instance per machine solution.
Example is attached.
(See attached file: TestOne.pex)
[email protected] on 02/18/98 10:01:07 PM
Please respond to [email protected]
To: [email protected]
cc: [email protected]
Subject: Re: How do I keep an application from being started more than
once?
Martin,
there are two ways to read your question
(a) no more than one instance of an application per machine
(b) no more than one instance of an application per "user"
now if a user has only one machine, and your system has "userids" and you
only want
one active "session" per "user" then the distinction is irrelevant.
However, many systems
let people share logins, so a token based thing enforcing one login will be
problematic.
The downside of #1 approach suggested by Curtis happens when a machine gets
hosed without "logging" the user off the security system, then they can't
get in until their ticket expires or a sysadmin gets involved. Should be
manageable, however. But this enforces one application
instance per user, unless you check both for the presence of an active
token for that user as well as the presence of a token tied to that
particular node name. Otherwise there is nothing to prevent the same user
from launching the app again and logging in as a different user. This is
definitely the best approach of the bunch, and can be adapted for either
(a) or (b).
Suggestion # 2 won't work unless the application is built as a compiled
client,
since the process name will be 'ftexec' and not the "name" of the
application. And it doesn't
prevent a user from launching the app from a different machine (or people
sharing logins). So again it depends on what you are trying to achieve.
#3 also only prevents multiple instances per machine, not necessarily by
user. Of course
most people don't have multiple machines. The point is that you may be
trying to
prevent your users from sharing logins. In which case the file thing won't
do it.
Some other ideas:
1. You could, however, enforce one application per machine using the
installed partition agent's ExecutingPartition instrument name. As long as
the user doesn't run the app in a different environment, you can have the
app check at startup time if there is another
ActivePartition running under the same InstalledPartition name.
(ActivePartitions are child agents
of InstalledPartitions).
2. use the ObjectLocationManager and bind a simple object into the naming
system using a naming scheme such as
/MyApplication/MyNode or
/MyApplication/MyUserId
the presence of either one would indicate that another instance of that
application is running on either that machine or that user. Of course
these have to be cleaned out, and subject to similar downside as
alternative #1. So you'd essentially be using the forte naming system as a
distributed lock manager (ouch).
3. Have the application remove the shortcut to launch it upon startup, and
recreate it when it is finished, or move it to a hidden place. There it
is - the worst idea I've ever come up with. Don't
do this!
Regards,
John
From: Curtis Bragdon <[email protected]>
Date: Wed, 18 Feb 1998 16:36:58 -0500
Subject: Re: How do I keep an application from being started more than
once?
Here are some quick ideas. None of them should be too hard to implement,
although each has some drawbacks.
1. Have a login server track who is logged on, and if there is already a
logon for a given user or a given machine, then deny the application
startup. The nice thing about this is that a user will not be able to have
multiple logins even by going to another machine. Then again, this may not
be so nice, and you also get a possible single point of failure on the
login server for which you will have to prepare.
2. Drop to the operating system, and get a list of processes for the client
machine. If the name of one of them matches the name of application that
is being run, then deny startup. This avoids a network hit, but requires
some OS specific code. Also, a clever user could change the name of an
executable to get around this. Note that a user could have another login
on another machine.
3. Write to a file on the local machine. You can hide the file in some
suitable place, and can also scramble some information so that a user
cannot get around having this file present by reading from the file at
startup and then writing to it. Based on the state of your application,
the file will have some scrambled information indicating if an instance of
an application can be started. If you retain the write lock (i.e. do not
close) the file for the duration of the application, you increase your
security at the risk of a confused user if the application gets terminated
without releasing the lock. Depending on the OS where the client will run,
this could be an issue. If you like this option, perform some experiments
first on all configurations of an example client machine to determine the
behavior. Again, this only works to prevent an extra login on a single
machine, not system wide.
If you are not concerned about your users hacking around too much and don't
care about a login on another machine, I would opt for some version of
number 3. Otherwise, I would venture number 1.
Regards
CSB
At 07:47 AM 2/18/98 -0500, Martin G Nystrom wrote:
A user can launch an application, then launch it again. How do we make itso
that the user can only run one instance of the application?
Martin Nystrom
Eli Lilly and Company
([email protected])
Curtis Bragdon, Senior Consultant, Forte Software
[email protected]
Voice Mail: (510) 986-3807
Paging: (888) 687-6723
"I've seen dozens of triggering towns." - Richard Hugo
John Jamison
Vice President of Technology
Sage IT Partners, Inc.
415 392 7243 x 306
[email protected]

Similar Messages

  • How do I keep my Imessages from being viewed on other devices under my apple ID?

    How do I keep my Imessages from being viewed on other devices under my apple ID?

    No, you can authorize any number of email addresses on your Apple Id and then select one of those to use as an alternate Send and Recieve for Messages. It isn't necessary to use seperate AppleIDs. I use my phone number on my iPhone and an email address on the iPad.

  • How do i keep certain songs from being uploaded from my library to my ipod

    how do i keep certain songs form being uploaded from itunes to my ipod the check button does nothing
    30gig ipod   Windows 98  

    Set your iPod so you can manually manage your songs, see here for details:http://www.apple.com/support/ipod/tutorial/ipgettingstartedt3.html

  • How do I keep multiple tabs from loading all at once when I open Firefox?

    How do I prevent multiple tabs from loading every time I access Firefox? These are open tabs, but I do not want them to open simultaneously every time I want to open a new tab. Then I have to minimize each one in order to access other applications on my desktop. Please advise.

    Tools > Options -> General - Startup = select what you want Firefox to do on startup there
    '''Blank Page''' or '''Homepage''' ''(as long as those pages aren't all your Homepages)'' are alternatives to '''''windows and tabs from last time'''''
    Or as Vivek.Wilfred mentioned, upgrade to Firefox 8.0.1 where you have abother option - Don't load tabs until selected.

  • How do I keep my text from being distorted when I do a lower arc?

    When I create an upper arc in my text it looks normal, but when I do a lower arc, it expands all the letters in the middle instead of just curving them, so that it has a sort of "fish eye" look. How do I keep it from doing this?

    No, gratitude for your help. Since I've never done the text the way you suggested, I found a video on youtube to show me how. However, I have not been able to get satisfactory results. Why will PS allow me to make a perfect upper arc with my type, and it won't do the same on the lower arc?

  • How do I keep older emails from being in the cloud, taking up my space?

    How do I keep older e-mails out of the cloud, taking up my space?

    Patti23 wrote:
    How do I move purchased movies from itunes to the icloud? 
    Delete them from the local computer.  Nothing gets moved.  If the content was purchased from iTunes it should be available for download again in the future.
    Patti23 wrote:
    I want to keep them on the ipad they have been moved to.
    If the device is synced with iTunes on the computer and the content is deleted from iTunes it will also be removed from the device.
    Realistically, if you want to keep the content, keep it stored locally.  Purchase an external drive to store the content on.  Keep in mind that iOS devices are NOT backup devices, they merely mirror the content in the iTunes library on the computer.

  • App or podcast downloaded to iphone is deleted from iphone and transferred to iTunes 11.  How can I keep the file from being deleted from the iPhone?

    I recently updated iTunes from version 10.x to 11.  In version 10, I could download a podcast or an app to my iPhone from the app store, then the app or podcast would co COPIED to iTunes during a sync.  Now with version 11, when I sync, the app or podcast is deleted from my iPhone and MOVED to iTunes.  How can I get back the old feature of making a copy?  This is a very dumb thing that happens in iTunes and I can not believe that I am the only one to complain abou this.  Please help me.  What do I need to change in iTunes to keep my copy on the iPhone.
    Thanks to all you geniouses out there!
    Doug

    Not 100% sure of your question.  If you are wanting to delete apps from itunes just right click then delete then empty recycle bin.

  • How do I keep iPhone Contacts from being visible in iMessage on MacBook?

    I've disabled iMessage, but if you open it and try to type a message, you can easily see all the Contacts from my iPhone. How do I prevent that?

    HI,
    When I have turned Off the Contacts app part of my iCloud account it asks me whethr I want to keep them on my Mac (and not whether I want to delete them from all devices).
    They always stay on my iPhone.
    7:36 pm      Sunday; June 1, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • How do I keep my videos from being squeezed in Premiere Elements 12?

    I was using one dell laptop and moved over to another dell laptop and suddenly Premiere Elements 12 was squeezing my projects. I am unable to adjust the project settings and when I use the interpret footage option, my videos play horribly.  What is the best answer for this?  How can I fix my settings for PE12 since all my footage comes from the same source?

    CKENN19
    Thanks for the follow up. It sounds like you are OK, but let me review a few things to make sure.
    Assuming NTSC setup...Windows
    1. If you are capturing DV data with a firewire connection into Premiere Elements 12/12.1, your source media can be DV Standard 4:3 or DV Widescreen 16:9 depending on your camera recording settings.
    Premiere Elements 11, 12, and 13 are set up to take over setting the project preset automatically based on the properties of the first video dragged to the Timeline. When it cannot do the job for whatever reason, it does not give you the closest fit to what you require for your particular source. It gives you its default 1080i30 (1920 x 1080 @ 29.97 interlaced frames per second).
    If your camera has DV data 4:3, then you set the project preset manually beforehand to NTSC DV Standard. If your camera has DV data 16:9, then you set the project preset manually beforehand to NTSC DV Widescreen. Both Standard and Widescreen have the same frame size, that is, 720 x 480. In the case of the Widescreen, there is a 16:9 flag which stretches the video for display after encoding (to 856 x 480).
    You should not have to be using Interpret Footage to get the appropriate aspect ratio when you have done DV data 4:3 or 16:9 capture firewire into Premiere Elements Capture Windows. That concerns me if you do.
    Also important is that you are putting DV AVI type 2, not type 1, on your Timeline in the DV data capture firewire process. If Premiere Elements is part of this capture process, DV AVI type 2 is what you should have.
    Please consider the above and then let us know, when your schedule permits, if you are OK with the information
    Thank you.
    ATR

  • How can I keep my emails from being deleted from the Telus server so I can view them on my home computer as well?

    How can I set my IPad email account to leave the messages on the server?  I want them left on the Telus server until I choose to delete them.

    I have POP mail accounts on my iPad.
    Settings > Mail, Contacts, Calendar leads me to the correct place.
    At the top will be a list of my Mail accounts.
    Tapping on an Account brings up all the info in the account.
    The Advanced choice is at the bottom of the window and usually requires scrolling down to see it.
    Tapping Advanced brings up another widow with the Delete from Server choice. Tap that and you can then tap Never.
    I'm using an iPad 2 and an iphone5 running iOS 6.0.1

  • My homepage keeps getting reset to something I do not want. How to I keep my homepage from being changed

    I go to tools and set my homepage. Everytime I click on home it changes it back to some search page I do not want. How do I prevent this

    Set the Integer pref browser.sessionstore.max_resumed_crashes to 0 on the about:config page to get the about:sessionrestore page immediately with the first restart after a crash has occurred or the Task Manager was used to close Firefox.
    * http://kb.mozillazine.org/browser.sessionstore.max_resumed_crashes
    That will allow you to deselect the tab(s) that you do not want to reopen, but will allow to reopen other tabs.
    See:
    * http://kb.mozillazine.org/Session_Restore#Restoring_a_session_after_a_crash
    * http://kb.mozillazine.org/Browser.sessionstore.max_resumed_crashes
    See also:
    * https://wiki.mozilla.org/Session_Restore#Preferences
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    *Use the Filter bar at to top of the about:config page to locate a preference more easily.
    *Preferences that have been modified show as bold (user set).
    *Preferences can be reset to the default via the right-click context menu if they are user set
    *Preferences can be changed via the right-click context menu: Modify (String or Integer) or Toggle (Boolean)

  • How can I keep my images from being deleted when using Image capture. Even when I do not check the box they still get deleted.

    This happened after I updated my operating system.

    Whats with the MBP lid? Dont close it ... if you're so concerned! Just go to System Preferences/Energy Saver and set it to how you like it.

  • How do I keep my profiles from being wiped and substituted by default profile after upgrade

    Linux, openSuse 13.1. After setting up 9 profiles that I need to do my work, an upgrade wiped each custom profile and filled it with the firefox default, how do I stop this behavior.

    These add-ons can be a great help by backing up and restoring Firefox
    '''[https://addons.mozilla.org/en-US/firefox/addon/febe/?src=collection&collection_id=33bf10fa-666d-45a2-9bc9-491ce21671c6 FEBE (Firefox Environment Backup Extension)]''' {web link}
    FEBE allows you to quickly and easily backup your
    Firefox extensions, history, passwords, and more.
    In fact, it goes beyond just backing up -- It will actually rebuild
    your saved files individually into installable .xpi files.
    It will also make backup of files that you choose.
    '''[https://addons.mozilla.org/en-US/firefox/addon/opie/?src=collection&collection_id=33bf10fa-666d-45a2-9bc9-491ce21671c6 OPIE]''' {web link}
    Import/Export extension preferences

  • How do I keep iCloud mail from being my outgoing message default address?

    When I send outgoing messages on Mail, it defaults to iCloud rather than my Mail POP account.  I have the POP account selected in preferences.

    Do you have it selected here in preferences?

  • How do I keep .mov clips from being squashed when imported into iMovie HD6?

    Hi there! First time poster... Hoping someone can help me out with this:
    I've stupidly shot some footage with my digital camera sideways, portrait-style. I used QuickTime Pro 7 to rotate the footage clockwise, preserving the aspect ratio, so now the .mov clips are 480x640 pixels (so 3:4, instead of the standard 4:3).
    When I import the clips into iMovie HD 6, the footage gets squashed to fit the 4:3 screen, making everyone look shorter and fatter. The Help file advises that iMovie "automatically adjusts incoming footage to fit the screen size (aspect ratio) of your project".
    Is there some way I can opt out of this automatic adjustment? I'd prefer to have black bands on the sides of the screen than squashed video!
    Thanks for any help you can give. Cheers!

    You'll need to make an all black 640X480 image file and add it to your video.
    Adjust its layer so it is in the background and then reduce the dimensions of your video so it fits over it.
    Bring this new file into iMovie.

Maybe you are looking for

  • Ipone 5 stuck in recovery mode after failed update

    Hi I am stuck can anyone help? My Iphone 5s tried to do a o/s upgrade while on holiday and got  stuck in recovery mode saying it needed to connect to the pc. I connected waiting 1hr for the o/s software to download and extract only to see an error "T

  • Crystal Reports Version Question

    Hello, I am developing a web site using vs 2010 and the compatible version as downloaded from here. I have come across a small issue that I'm sure is easily solvable but I can't find any references to it. When I try to run this solution on another ma

  • Create fillable form with changing source document

    I want to create a fillable, saveable form in which the source document changes.  Hope I am using the correct verbiage.  Source document meaning the Word document that I convert to a .pdf, which I then use to create the fillable form.  This source do

  • What is encoding? And what is it used for?

    I see 2 pages that are encoded on my iphone in the about settings diagnostic and usage.....

  • How to create realistic Stationary Mockup?

    I have been learning Photoshop for last few months and getting pretty good at it but still there's lots and lots of stuff that i need to learn and come across every day. I wanted to know how do i create Stationary mock up in photshop. I am attaching