Prevent running the same program twice or more + some other..

Hi All,
I'm trying to figure out how to do the following
1) How can I prevent a user from running the same program more than once.
2)If a user try to shut down the computer while my program is running, I need to trap it down and save some data before terminating the program, how can I do it?
Can any one help me???
thanks a lot in advance!

Don't [url http://forum.java.sun.com/thread.jspa?threadID=699067]cross post.
Answers in the other post please.

Similar Messages

  • Prevent push the same button twice

    Hi all! I have a button that performs a specific function .All I would like to do is prevent the user to push the same button twice. I tried already to include a 'disable button' built in function but it can't work from within.
    Any ideas?

    I would set the button to be disabled before you call your function, but I suppose it doesn't matter. You need to change those navigable properties on the button to NO. You cannot change the Enabled status of the button if it is the current item. Keyboard Navigable and Mouse Navigate should both be set to NO.

  • Can the same NDS statement be used by other users running the same program?

    Say you have an NDS statement running in an application. We have users all over the country running this package off of the same database. If an NDS statement gets stored in the Library Cache than would other users running the same package use that NDS statement or would their processes spawn another yet identical NDS statement?

    There is no difference in the caching of dynamic or not statements. If statement is already in cache and it's session environment is similar to current session one then statement will be soft-parsed.

  • File not found error on some computers running the same program

    Dim pList As System.Diagnostics.Process
    retval = 0
    PTRName = "F:\myprogram.exe"
    If My.Computer.FileSystem.FileExists(PTRName) Then
    System.Disgnostics.Process.Start(PTRName)
    pList = System.Diagnostics.Process.GetProcesses
    For each proc As System.Diagnostice.Process in pList
    If proc.ProcessName = "myprogram" Then
    retval = proc.Id
    Exit For
    End If
    Next
    If retval > 0 then
    'continue
    Else
    'error message
    End If
    End If
    PTRName = "F:\myprogram.exe"
    If My.Computer.FileSystem.FileExists(PTRName) Then
    Retval = Shell(PTRName,4)
    If Retval > 0 Then
    'Continue
    Else
    'Error message
    End If
    End IF
    I have created a program which:
    opens a file
    reads the records and massages the records
    writes the records to a new file
    Launches a program that uses the resultant file.
    The program was written on Windows xp MCE using Visual Studio 10. The resulting program works fine.
    I places The executable and the input file onto a flashdrive, and then tested it on other machines.
    Two of the machines are both Win 7 Pro 64bit with .Net 4. On one machine it works great. On the other I get a "File not found" error when starting the second process. This is the failing code:
    The problem is with the Shell command. When I rewrite it as:
    it works on both machines
    So my question is: Why does exactly the same code (The same flashdrive was used on both machines) work on one machine and not the other (when both machenes appear to be at the same level)?
    In both cases I verify the file exists in the correct place before I try to start it.
    Any help would be appreciated.
    Thanks in advance
       John 

    The use of F is just an example. I use:
    OutputPath = My.Application.Info.DirectoryPath 'Where app is run from (root)
        'Make sure the path ends in \
        If VB.Right(OutputPath, 1) <> "\" Then
          OutputPath = OutputPath & "\"
        End If
    to get the correct information.
    Then
      PTRName = OutputPath & "myprogram.exe"
    BTW "myprogram.exe" is not the correct name it is just an example.
    Sorry if this caused confusion
    However all of this is not the point. If:
     My.Computer.FileSystem.FileExists(PTRName)
    is true then the file is in the right place. Therefore:
    Retval = Shell(PTRName,4)
    must also work. However it does not on some machines.
    Is the problem in .Net, VB or VS because it is not in my code. 
    I have also used a routine similar to you (in VB6) to find a particular volume, but used the volume label. That worked better in my case.
    John

  • Running the same VI twice

    I am trying to run to same main VI twice simultaneously. I do not want the two main VIs to share information. They need to run totally independantly. I have copied the original VI and all SubVIs to a new directory, but when I load the second main VI it shares subVIs with the first main VI. How can I avoid this? I want them to run totally independantly.

    I think your problem is that you're trying to open VIs with the same name. LV can only hold one VI of a given name in memory at one time, so if you want the VIs to be completely different, you will need to rename all of them.
    Another option would be to make all of them reentrant. This will mean that each place you call the VI will hold a seperate copy of the VI. You should make sure this doesn't affect the way your code works (for example, if you have a functional global, it will be affected by this).
    I think the easiest way would be to make an EXE and then copy it and rename it. I believe that when running in the run time engine, you get seperate execution for each EXE, but I'm not at all sure of this, so you should check it.
    If this isn't so, you can try merging the first two options.
    Try to take over the world!

  • Export to disk to the same file twice or more

    Post Author: Koen
    CA Forum: Exporting
    Hello,
    i am writing an application in vs 2008 en cr 2008.
    The purpose of the application is to send offers to the customer throug e-mail.
    The report is exported to filename "Offer Nr : 70012.pdf" in the report the name of the customer is changed to his name and then the PDF is send via smtp server.
    The first time this works fine, the second time i get an error : The process cannot access the file "Offer Nr : 70012.pdf" because it is being used by another process.
    Code :
    public void ExportOfferToPDF(String FileName, String EMail, string DocumentId, String ContactId)         {
                DemandeDePrix1.RecordSelectionFormula =                "{vw_print_doc_demande.id} = '" + DocumentId +                "' and {vw_print_doc_demande.ContactId} = '" + ContactId + "'";
                DemandeDePrix1.ExportToDisk(ExportFormatType.Excel, FileName);
                SendEmail(FileName, Email);                    }

    Post Author: IdoMillet
    CA Forum: Exporting
    Sounds like you may need to place a delay between the export and the email.If you'd like to achieve the same thing without the need to run the report again and again for each ContactID, consider a 3rd-party tool.  See list of such tools at: http://www.kenhamady.com/bookmarks.html.My Visual CUT software can do this in a single pass without a need to know the list of group values ahead of time -- they are identified on the fly based on the information in the report.- Ido

  • HT4528 When I am texting someone and they reply i get the same message twice rigth after each other how do i fix that?

    Everytime I am sending and receiveing text messages i keep receiving the text twice. How do i fix this on the iphone 5?

    Apple ID cannot be merged or transfered.
    Read this tips
    iOS 5 & iCloud Tips: Sharing an Apple ID With Your Family

  • How to share the same QUERY among report, chart on the same page? and more

    Dear HTMLDB experts,
    I am absolute rookie to this tool, so I have some questions need you all's help.
    (1)
    When I build a page with a spread sheet and a chart on the same page, they all use the same query to get the data. However, I have to type in the SQL twice in spread sheet(report region) and chart's attribute sections. It seems so dumb, does it really run the same query twice, is there a way to share the same query?
    i.e. SELECT name, timestamp, value FROM foo WHERE name = :P1_NAME? (by the way, is :P1_NAME case sensitive?)
    (2)
    In the same chart, if I have two series from two columns of the same table, I have to write 2 queries, one
    select null, timestamp, value1 from same_table
    and
    select null, timestamp, value2 from same_table
    Is it possible to use one query: select timestamp, value1, value2 from same_table and define the series on two value columns of this single query? It's really no point to run two queris.
    (3)
    In a chart, when the query has ORDER by clause, it seems the chart is not showing up.
    So instead of using the query below
    SELECT null, to_char(ts,'mmdd') ts, value
    FROM same_table
    WHERE ts >= TRUNC(SYSDATE) - :P2_DAYSAGO - 1
    AND name = :P1_NAME
    ORDER BY ts
    I have to use a walkaround query
    SELECT null, ts, used
    FROM
    SELECT null, to_char(ts,'mmdd') ts, value
    FROM same_table
    WHERE ts >= TRUNC(SYSDATE) - :P2_DAYSAGO - 1
    AND name = :P1_NAME
    ORDER BY ts
    Further more, it seems :P1_NAME in the same subquery is not working for the chart, i get xml parsing errors in SVGviewer, however the same query works for the spread sheet area, I am really puzzeled. Not sure whether it's dumb tool or dumb me :-)
    Appreciate your help!
    Jianhui

    <quote>
    Further more, it seems :P1_NAME in the same subquery is not working for the chart, i get xml parsing errors in SVGviewer, however the same query works for the spread sheet area, I am really puzzeled. Not sure whether it's dumb tool or dumb me :-)
    </quote>
    For this particular issue, I found out that neither is the tool dumb nor is me. It's SVGViewer messed up with the firefox browser, after I rebooted the computer this morning, problem is gone. I didnt reboot after I copied SVGViewer dll and zip file to firefox plugin directory yesterday. Never had that pain with IE and Netscape, oh well :-). So please ignore this section, however other questions are still unsolved puzzles for me. Thank you all if you can share some light on those questions.

  • Prevent double running the same FORM application

    Dears,
    Anyone knows how to prevent users from running same FORM application in the same computer twice? Is there any ways to detect the application is already running and refuse to run it again?
    Thanks,
    Vic

    i have a tree-menue where i use code like this in the when-tree-node-activated trigger which opens new forms:
    frmId := find_form(frmToOpenName);
    -- Open form only if there's no instance (for current user) of it at the moment
    if id_null(frmId) then
    open_form(.....);
    else
    go_form(frmId);
    end if;
    of course, if the user opens another tree-menue, he can open the same form again. but in one browser (i use 9i), he can open it only once.

  • Backup-restore vs running the same SSIS datacopy project twice

    I have 2 different applications which need the same source data which is copied from a production database. The 2 applications run on different servers, so they can not use the same source database. The way I see it, I have the following two options:
    1. I develop a SSIS solution to load the required data into the source database and run the same project on both servers, creating 2 identical source databases.
    2. I develop a SSIS solution to load the required data into the source database, run this solution on one of the servers. I then create a job on this server to make a backup after this process is done and restore it on the second server, also creating for
    me 2 identical source databases.
    Which method would be more efficient and why? (what also might be relevant is that one of the two sourcedatabases needs to refresh every night, the other one only once a week)

    I would definitely use backup and restore. It will consume fewest resources and you *know* that the data is identical.
    Tibor Karaszi, SQL Server MVP |
    web | blog

  • Why my money were taken twice for the same program why my money were taken twice for the same program

    why my money were taken twice for the same program?

    contact expresslane via email or chat, they will refund you as long as this is the first time

  • Don't charge twice for the same program.

    Hi,
    Apple and I are already well acquainted. You are currently taking my money while I am downloading Lost. Why does my buying login not work for discussions? With a single mouse click I can buy programs or songs. It takes thousands to get to support. As a customer service, please fix this egregious bug and tell your support hand what your revenue hand is doing.
    Please don't double charge me for the same program. I downloaded Lost's second season, first episode to see if I liked it. I do like it and have decided to download the entire season. Please don't make me download 23 individual episodes to iTunes (at much greater cost) when you already know that I have purchased the first one (your spell checker objects to iTunes???). I am downloading into your I tunes program so you should be able to recognize that it is already there, paid for and licensed.
    Once you have read a news paper, you either put the remains in your bird cage or recycle it. It would be unconscionable to charge for 2 copies of the same paper. Please fix this revenue enhancing bug (?).
    Thirdly, please give preferential downloading speed to the first program downloaded when downloading an entire season. Don't make your paying customers wait for 3 program downloads before being able to view the first one.
    Fourthly, please establish a [email protected] email address and add a link for it to your support web page. Stop making disappointed customers waste time wading through your labyrinthine and duplicate login procedures.
    Cordially,
    BrianP
    Godzilla Windows XP Pro noyfb
    Godzilla Windows XP Pro
    Godzilla   Windows XP Pro   noyfb

    First, we're pretty much all just your fellow users here. Feedback to Apple should be send through the appropriate feedback page.
    Second, the pricing policies are mostly under the control of the content owners. They are almost certainly the ones that don't want to allow for credit for parts of a season pass already purchased. So your complaint is probably best directed to the networks.
    Once you have read a news paper, you either put the remains in your bird cage or recycle it. It would be unconscionable to charge for 2 copies of the same paper. Please fix this revenue enhancing bug (?).
    Buy an issue or two of a newpaper or magazine off the newstand. Decide you like it and want to subscribe. Ask the newspaper or magazine for credit for the issues you already bought. What results do you get?
    Third, support for the iTunes Store is easily found, with a maximum of just four mouse clicks. Select the iTunes Service and Support under the iTunes Help menu. Click the " iTunes Store Support" link. Select the appropriate topic (which may take an extra mouse click to select the appropriat tab first). You'll find a web form at the bottom of each of those pages through which you can contact the iTunes Store customer service group. Or click on the Support tab at the top of every Apple web page. Select "iTunes + iPod". Select "iTunes Store". You'll be in the same place as above. Pretty simple, IMHO.
    Finally, I had no problems using my iTunes ID (which is not the same as the ID I use here on a daily basis) to set up my access to the Discussions. It took all of two minutes and a few keystrokes. So I'm not sure what you found to be so onerous. But again, if you feel it was a problem, use the feedback link I posted above.
    Message was edited by: Dave Sawyer

  • Re: Running the same (Forte) application multiple times -for different

    Hi
    We had the same problem - how to deploy a number of identical applications, using each their own db.
    (for training).
    The solution we used is to wrap the entire application into different applications by using a very small
    module called KURSUS01, KURSUS02 etc, that did nothing but call the start procedure of the main app.
    Then in the dbsession connect, we made a call appname to get the application name, and appended the
    first 8 chars to the dbname. Thus our dbnames now points to logicals name: rdbdataKURSUS01, rdbdataKURSUS02 etc.
    All this allows us to deploy the identical apps in the same env, or change one version, and run both the old
    and new program on the same pc and server at the same time (eg. KURSUS01 and KURSUS02).
    I also think this is a kludge - but it works nicely!
    Jens Chr
    KAD/Denmark
    -----Original Message-----
    From: Haben, Dirk <[email protected]>
    To: 'Soapbox Forte Users' <[email protected]>
    Date: 15. januar 1999 09:41
    Subject: Running the same (Forte) application multiple times - for different business clients.
    Hi All
    We have a number of different business clients all willing to use our
    application.
    The (forte) application is to run on our machines etc for these (business)
    clients.
    All (business) clients will have their data kept in separate Oracle DBs
    (instance).
    The problem now is that the entire (forte) application is written using
    DBSessions.
    Now, depending on what business client needs to be serviced (so to speak) we
    need to attach to the right DB - or use the "right" SO.
    The two options we can think of are:
    Option1:
    Programatic change to somehow "know" what (business) client (DB) I'm talking
    about and then use the right DB.
    Pro:
    Only one forte environment to maintain
    Can run multiple (business) clients on same PC at the same time
    Con:
    Requires many program changes
    bending O-O rules(?)
    can't dynamically name SOs so can it be done at all? (ResourceMGRs maybe?)
    Option2:
    Use separate environments! One for each business client.
    Pro:
    More defined separation of app and data,
    SLA-easy
    Con:
    Maintain "n" number of environments
    Can only run the application for one environment (business client) at a time
    on one PC - Big Negative here!
    Not knowing any feasible solution to option 1 (without much code changes and
    developer moaning) I would go for option two; as I have already worked on
    multi-environment setups on VMS back at the Hydro (hi guys).
    I would appreciate any comments from anyone who has solved this problem.
    How, Why Pro Con etc.
    TIA,
    Dirk Haben
    Perth, WA
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi
    We had the same problem - how to deploy a number of identical applications, using each their own db.
    (for training).
    The solution we used is to wrap the entire application into different applications by using a very small
    module called KURSUS01, KURSUS02 etc, that did nothing but call the start procedure of the main app.
    Then in the dbsession connect, we made a call appname to get the application name, and appended the
    first 8 chars to the dbname. Thus our dbnames now points to logicals name: rdbdataKURSUS01, rdbdataKURSUS02 etc.
    All this allows us to deploy the identical apps in the same env, or change one version, and run both the old
    and new program on the same pc and server at the same time (eg. KURSUS01 and KURSUS02).
    I also think this is a kludge - but it works nicely!
    Jens Chr
    KAD/Denmark
    -----Original Message-----
    From: Haben, Dirk <[email protected]>
    To: 'Soapbox Forte Users' <[email protected]>
    Date: 15. januar 1999 09:41
    Subject: Running the same (Forte) application multiple times - for different business clients.
    Hi All
    We have a number of different business clients all willing to use our
    application.
    The (forte) application is to run on our machines etc for these (business)
    clients.
    All (business) clients will have their data kept in separate Oracle DBs
    (instance).
    The problem now is that the entire (forte) application is written using
    DBSessions.
    Now, depending on what business client needs to be serviced (so to speak) we
    need to attach to the right DB - or use the "right" SO.
    The two options we can think of are:
    Option1:
    Programatic change to somehow "know" what (business) client (DB) I'm talking
    about and then use the right DB.
    Pro:
    Only one forte environment to maintain
    Can run multiple (business) clients on same PC at the same time
    Con:
    Requires many program changes
    bending O-O rules(?)
    can't dynamically name SOs so can it be done at all? (ResourceMGRs maybe?)
    Option2:
    Use separate environments! One for each business client.
    Pro:
    More defined separation of app and data,
    SLA-easy
    Con:
    Maintain "n" number of environments
    Can only run the application for one environment (business client) at a time
    on one PC - Big Negative here!
    Not knowing any feasible solution to option 1 (without much code changes and
    developer moaning) I would go for option two; as I have already worked on
    multi-environment setups on VMS back at the Hydro (hi guys).
    I would appreciate any comments from anyone who has solved this problem.
    How, Why Pro Con etc.
    TIA,
    Dirk Haben
    Perth, WA
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Why does Adobe Manager download and install 2 of the same programs?

    Am I suppose to get more than one icon for each app? I have a (64bit) and it appears a 32bit both install when I download with Adobe Manager.
    I have a fresh install of windows 8. -- probably the issue -- an upgrade from win7. I completely uninstalled all apps, did a fresh install of my upgrade, and kept no files, or settings. It however, did keep somethings with the new window.
    Looking in my program list, I have the same program listed in (program files), and in ((86program files)), there is the 64bit program.
    It seriously looks like I am downloading and insalling two seperate versions.... why?
    I do have another desktop computer, which is older, and running window xp, and it is a 32bit system.
    The main cpu I am using is a Dell.... (maybe that's the problem) laptop, Inspiron 1545
    help.

    For which application are you seeing two versions?
    Photoshop installs both 32 and 64 bit versions on a 64-bit system when installing from the Adobe Application Manager using the Creative Cloud subscription.

  • Reinstalling Premiere Elements on the same PC twice

    I had to reinstall PE on the same PC twice after intalling a new hard drive an again after reinstalling Windows 7. The program seems to think I have reinstalled PE 8 on more than two PCs. How do I fix this?

    You contact Adobe (this is a user to user forum) to have them reset your activation count
    Select a reason, then click I STILL NEED HELP to activate Premiere Elements chat
    -http://helpx.adobe.com/contact.html?product=premiere-elements&topic=activating-my-product- or-serial-number-issues

Maybe you are looking for

  • Updated to 10.3.9, QTSS will not start

    A year after updating my OS X Server 10.3 to its final version release, QTSS still refuses to start. Server Admin, either at the colo or on a remote desktop, yields no error message. I've been content producing fast-start 3 minute .mp4 and .m4v downl

  • HP G60-530CA NTLDR is Missing, no FIX found

    Hi, I'm getting error NTLDR is missing, press CTRL+alt+Delete to restart. Everytime booting up my pc. I have bought it from Future Shop and my Recovery Disks(2 discs) does'nt boot. I have changed all the Orders on Start up and used Manual Start Up op

  • How we create RFC in SAP R/3

    Hi all. I want to create a iview and when i click on preview or Deploy, it shoud display screen of Transcation SE11. I think we can do this by creating RFC of transcation(SE11). So Please tell me- How we create RFC in SAP R/3 for transcation SE11. I

  • OpenLDAP and WLSP9 LDAPRealm

    How do I configure my OpenLDAP so that WLSP9 LDAPRealm will actually authenticate the users. I have the realm debugging turned on , and I can see that the user has been found, but no matter what password I use the authentication fails. I know that th

  • Selction screen in dialog program

    Hi All.. In my requirement, i need a selection screen that has a parameter for the PO number. Based on the valid PO number, the line items of the PO need to be displayed on the screen where the user should be able to split the line items into differe