Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Batch file to oper a program

  • 22-04-2009 06:08PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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, Registered Users 2 Posts: 26,449 ✭✭✭✭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