How to invoke program in Windows to open file automatically

I want to invoke some programs in Windows,such as winword,excel.But I don't intend to set program for each file and hope that it can invoke program to open files automatically
Can someone help me?thanks

To DrClap:
I am very appreciated that you answer my
wer my question. in the dos mode,when I type "start
d:\test\test.xls", test.xls can be opened
automatically.however I want my java program load the
file,so I put the command line into my program just
like below:Your Java program doesn't load anyhing.
<code>Runtime.getRuntime().exec("start.exe
d:\\test\\test.xls");</code>
I just get error like that:
<code>java.io.IOException: CreateProcess: start.exe
d:\test\test.xls error=2</code>
Hope for your precious reply!
thanks!Replace "start.exe" with "start", and I'm not sure whether it's a shell command, so you'd have to use "cmd /c start ...".

Similar Messages

  • How do I get a program for windows to open without putting windows on my computer

    How do I get a program for windows to open and setup on my Macbook Pro without purchasing windows?

    Try running it through CrossOver Mac or WineSkin.
    (82008)

  • How do i stop two windows from openning when i clicon an email link, the home page and the link both open. i just want the link to open

    how do i stop two windows from openning when i click on an email link, the home page and the link both open. i just want the link to open

    That is a bug, so you need to wait until this get fixed.
    See https://bugzilla.mozilla.org/show_bug.cgi?id=531552 - Firefox 3.6b opens two windows when opening external links
    (please do not comment in bug reports)

  • I keep getting the message: "what should firefox do with this file" in Windows XP every time I want to download a file, e.g., adobe, excel, etc. How can this annoying message be deleted? The check box to "open file automatically" does not work!

    I keep getting the message: "what should Firefox do with this file" in Windows XP every time I want to download a file, e.g., adobe, excel, etc. How can this annoying message be deleted? The check box to "open file automatically" does not work!

    cor-el,
    Thanks for your prompt reply. However, the sources you gave do not seem to apply exactly to my situation. I have attached some screenshots that show what the dialogue box looks like for a pdf download, and what my settings in the Apps panel of Options are. You will note in the first screenshot that I have checked the box to handle this file type automatically; however, the next time I try to download a file of that type, the same dialogue box appears looking exactly like the one shown, so checking the "automatic" option appears to do nothing. The files to be downloaded from my Gmail messages are not generic or altered file types - they are shown as pdf, doc, docx, etc. So while your intent was good, your post did not help. Thanks anyway.

  • Firefox keeps asking me what program to use to open file types even though I have selected one and checked "do this for all files of this type" going foward

    I am working in Windows and every time I open an attachment, Firefox asks what program to use to open files of this type. I always select the proper program and then check the box that says use this program for all future files of this type. In spite of that, the program continues to ask for every file. How do I turn off this feature and just have the program remember the correct program to use for each type of file extension?

    Regardless of your download preferences, web servers can trigger a download prompt by sending either the ''Content-Type: application/octet-stream'' or the ''Content-Disposition: attachment'' header. You can check if that's the case by examining the server response headers in the [https://developer.mozilla.org/docs/Tools/Web_Console Web Console].
    For the latter problem install the InlineDisposition add-on and see if it helps.
    * https://addons.mozilla.org/firefox/addon/inlinedisposition/
    If the problem persists, post back here with either an example link or a screenshot of the relevant response headers in the Web Console.
    * [[How do I create a screenshot of my problem?]]

  • In  elements 11 how do i bring back the 'show open files ' panel at the bottom  of the editor

    In elements 11 how do I bring back the show open files panel at the bottom of the editor expert workspace please

    Click the button in the bottom left that says Photo Bin. In the Photo Bin, make sure the drop-down menu is listed as "Show Open Files"

  • I have a problem - the program QuickTime player longer open files - gororit that codec for the opening of the program at all of the files that I opened have the extension avi. tried to remove a program, it is impossible.I tried to load the program fr

    I have a problem - the program QuickTime player longer open files - gororit that codec for the opening of the program at all of the files that I opened have the extension avi. tried to remove a program, it is impossible.I tried to load the program from Apple, reinstalled. but I was wrong still going on! what to do?

    before using for all entries in, u need to check whether the driver internal table is empty, if it is empty, u should not enter into select statement.
    if u wont use this check means, when the driver internal table is empty, the second select will take all the entires from the tables.
    SELECT  AEBELN ALIFNR AKNUMV BVGABE BEBELP BGJAHR B~BELNR
            FROM  EKKO AS A
            INNER JOIN EKBE  AS B ON  BEBELN = AEBELN
            INTO  CORRESPONDING
            FIELDS OF TABLE ITAB WHERE B~VGABE = '2'.
    if itab[] is not initial.
       SELECT EKPOEBELN EKPOMATNR EKPOTXZ01 EKPOWERKS EKPO~NETWR
              EKPOMENGE EKPOMWSKZ
          FROM EKPO
          INTO CORRESPONDING FIELDS OF TABLE ITAB1
          FOR ALL ENTRIES IN ITAB
          WHERE EBELN = ITAB-EBELN.
    endif.
    I hope this will help u.
    else,
    Sujatha.

  • How can I maximize the window which opened using web.show_document() ?

    My user complain, everytime they want to print the report it didn't
    show maximize screen,
    How can I maximize the browser or window which opened using web.show_document() ?
    Thank you

    Thank you for replaying,
    I did search in forum, but I only go one about maximize window when calling
    a report (web.show_document). the link :
    Maximize the new opened window
    Frank said to use "Javascript to the Forms", but no futher explanation whow
    to do it ?
    please help, I don;t know javascript.
    Cabe,

  • How can I get new windows to open On Top Of the current window, not Behind the current window?

    Regarding the Options checkbox to "When I open a link in a new page, switch to it..." I already have that box checked, but still windows are opening behind my current window.

    Hello MichaelDMiller60, '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * You can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
    Thank you.

  • How can i convert a window media player file into a format playable on ipod

    hey guys can you tell me how can i convert an widdow media player file into a format that can be played on my ipod, i used videora ipod converter but it can't convert the window media player file

    the program you show change wma to mp3, but the mp3 file can't be understanded by the iPod, how can i change a wma file to a format understanded by the Ipod?

  • How to increase the limit of "maximum open files" in C?

    The default limit for the max open files on Mac OS X is 256 (ulimit -n) and my application needs about 400 file handlers.
    I tried to change the limit with setrlimit() but even if the function executes correctly, i'm still limited to 256.
    Here is the test program I use (compiled with gcc):
    #include <stdio.h>
    #include <sys/resource.h>
    main()
    struct rlimit rlp;
    FILE *fp[10000];
    int i;
    getrlimit(RLIMIT_NOFILE, &rlp);
    printf("before %d %d
    ", rlp.rlim_cur, rlp.rlim_max);
    rlp.rlim_cur = 10000;
    setrlimit(RLIMIT_NOFILE, &rlp);
    getrlimit(RLIMIT_NOFILE, &rlp);
    printf("after %d %d
    ", rlp.rlim_cur, rlp.rlim_max);
    for(i=0;i<10000;i++) {
    fp = fopen("a.out", "r");
    if(fp==0) { printf("failed after %d
    ", i); break; }
    and the output is:
    before 256 -1
    after 10000 -1
    failed after 253
    I cannot ask the people who use my application to poke inside a /etc file or something. I need the application to do it by itself.

    There is no reason to have more than 256 files open. Whatever you are doing, you are doing it wrong.
    The setrlimit() function only applies to new processes. It does not affect the current process. You can either run "ulimit -n 10000" in the shell and then start your program or split your program into two segments:
    #include <stdio.h>
    #include <stdlib.h>
    #include <sys/resource.h>
    #include <unistd.h>
    int main(void)
    struct rlimit rlp;
    int r;
    r = getrlimit(RLIMIT_NOFILE, &rlp);
    if (r == -1)
    perror("getrlimit()");
    exit(1);
    printf("before %d %d
    ", (int) rlp.rlim_cur, (int) rlp.rlim_max);
    rlp.rlim_cur = 10000;
    /* I'm curious how anyone ever expected it to work or got it to work
    without setting the max, because it sure seems to be required. */
    rlp.rlim_max = 10000;
    r = setrlimit(RLIMIT_NOFILE, &rlp);
    if (r == -1)
    perror("setrlimit()");
    exit(1);
    r = getrlimit(RLIMIT_NOFILE, &rlp);
    if (r == -1)
    perror("setrlimit()");
    exit(1);
    printf("after %d %d
    ", (int) rlp.rlim_cur, (int) rlp.rlim_max);
    return execl("/tmp/f", "/tmp/f", NULL);
    And the source to the "f" program is:
    #include <stdio.h>
    int main(void)
    FILE *fp[10000];
    int i;
    for(i = 0; i < 10000; i++)
    fp = fopen("a.out", "r");
    if (fp == NULL)
    perror("fopen()");
    fprintf(stderr, "i == %d
    ", i);
    return 1;
    return 0;
    [jdaniel@Pele:584] /tmp $ a.out
    before 256 256
    setrlimit(): Operation not permitted
    [jdaniel@Pele:585] /tmp $ sudo a.out
    before 256 256
    after 10000 10000
    fopen(): Too many open files
    i == 9997
    As you can see, it is convoluted and a real hassle. It isn't a bug in MacOS X 10.6 or any other version.
    So, I repeat my question yet again. Why do you want to open more than 256 files? It is, of course, a rhetorical question. Don't do it. If you feel you need more than 256 open files, review your architecture and correct it.

  • Where do you select which program you want to open files with a particular extension?

    Where do you go to select which program should open files with particular extensions?

    if you right click on the file and select get info, a window will open. Click on the "open with" and the window will expand. There you can select which application you want that document to open with. If you want to open ALL documents of that type with a specific application click the change all button.

  • How to see filename for Mavericks Calendar Open File alert?

    How can you see the name / path of the file to be opened for a Mavericks Calendar Open File alert from the Calendar UI?
    Before Mavericks, the file's name would be displayed in the item itself like this:
    Now all I see is something more like this:
    So I can longer see or verify exactly which file (if any) will be opened.

    The external image URL in my previous post isn't displaying, so here's a copy of the old iCal Open File image:

  • Photoshop Elements 12 will open as a program but will not open files

    My photoshop elements 12 worked fine. The program opens, but I cannot open an picture files from my SD card from the drop down open file...

    In case anyone else runs into this, I was also experiencing an issue with Elements 12 upon trying to open a photo - the message stated: ONCoreFoundation7.dll is missing
    in researching, I found this forum entry:
    http://forums.adobe.com/message/5759383#5759383
    The paths are different for the missing files, but once found and copied into the Elements12 directory, the program now shows Perfect Effects4 as a plugin. Hope this helps someone else in the future.

  • How can I get command+down to open files again?

    For as long as I can recall command+down arrow would open files in the finder. It seems this is no longer the case in 10.6.
    I've tried adding an application shortcut to Finder in the Keyboard System Preference pane but it doesn't seem to have any effect.
    Anyone know how to get it back?

    Following your suggestion I moved all com.apple.*.plist files to a temp folder on my desktop.
    Log out. Log in.
    Keyboard shortcuts were fine.
    From there I moved the plist files back in groups of 12, overwriting any existing files. Log out. Log in. Repeat.
    com.apple.symbolichotkeys.plist was the culprit.

Maybe you are looking for