Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Batch file to oper a program

Options
  • 22-04-2009 6:08pm
    #1
    Registered Users Posts: 534 ✭✭✭


    Hi all, Im working on my final project for college.

    For a certain function, I need to create a batch file that will open a program on my computer.

    Ive never done a batch file before, so could you be very clear about the steps involved please.

    i.e.> user selects an option on the local web site I will have running on wampp, this button uses the batch file I have created, the batch file will oper the program I need ((specifically R)you don't wanna know...).

    The program can open in it's normal way, no special requirements. Just like double clicking an icon on your desktop and it opening.

    If anyone else has a better way to do this, also please let me know.

    Thanks very much to anyone who can help, this means the world to me!


Comments

  • Closed Accounts Posts: 6,151 ✭✭✭Thomas_S_Hunterson


    I don't know if any browser would let a page execute files on a machine, seems to be a bit of a security hole.

    edit: For the batch file just create a plain text file, extension .bat or .cmd (XP or later I think). Content will be something like:
    start "c:\program files\R\R.exe"
    


  • Registered Users Posts: 534 ✭✭✭DonkeyRhubarb


    Sounds good Sean. Simple enough it seems. Im not certain how I will go about launching it specifically, but the batch is the best idea I have so far...


  • Closed Accounts Posts: 6,151 ✭✭✭Thomas_S_Hunterson


    Sounds good Sean. Simple enough it seems. Im not certain how I will go about launching it specifically, but the batch is the best idea I have so far...

    Yea batch files are quite handy: Just type what you normally would at a command line into a plain text file and you're done.


  • Registered Users Posts: 26,579 ✭✭✭✭Creamy Goodness


    get the website to call a perl program that using system() function.

    e.g.
    system("start c:\path_to_exe\do_some_****e.exe");
    


Advertisement