Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Writing BAT file to start execs  (Read 2735 times)

0 Members and 1 Guest are viewing this topic.

coronadesign

  • Guest
Writing BAT file to start execs
« on: August 25, 2007, 12:32:29 PM »
Ok so im trying to write a bacth file in notepad that starts .exe processes.... but I cant get past the  spaces in folder names and such, im new to this but cant figure it out. and the "" parameters creates a title... so im lost.

For instance I want to run

C:\Program Files\McAfee\McAfee Shared Components\Instant Updater\RuLaunch.exe
-------
SO i open up notepad and:

start C:\Program Files\McAfee\McAfee Shared Components\Instant Updater\RuLaunch.exe <-- doesnt work
start "C:\Program Files\McAfee\McAfee Shared Components\Instant Updater\RuLaunch.exe" <-- doesnt work

and ive tried more but I just cant get it... thanks for your help.

contrex

  • Guest
Re: Writing BAT file to start execs
« Reply #1 on: August 25, 2007, 01:58:35 PM »
As so often happens on here, just saying "doesn't work" is not very informative. After all, batch files generally do what they are supposed to do. This is not always what you want them to do though. In what way does it "not work"? What actually happens? How are you saving and running the batch? What do you see at the prompt when you run the batch? Are you just double clicking the .bat or .cmd file? If you do that, the command window will open (very) briefly, any error messages will scroll by like lightning, the window will close, and you'll be none the wiser. Far better to either put a PAUSE command after the START command line, or open a command prompt window in the folder where the batch file is located, and run it by typing its name at the prompt.

You need a title string, even if you are not actually specifying one, in which case you would use a zero-length string (two quote marks with nothing in between them.)

Quote
@echo off
start "" "C:\Program Files\McAfee\McAfee Shared Components\Instant Updater\RuLaunch.exe"
pause

...should work. It should start the Rulaunch app (IF the path & name are right and IF you have sufficient permissions and IF the file isn't damaged) and wait for you to press a key.

After you are happy, you can delete the pause command.

If it doesn't, are you sure:

(1) you have typed the path and executable name correctly?

(2) it is not already running?



« Last Edit: August 26, 2007, 12:15:04 AM by contrex »

ghostdog74



    Specialist

    Thanked: 27
    Re: Writing BAT file to start execs
    « Reply #2 on: August 25, 2007, 08:37:02 PM »
    As so often happens on here, just saying "doesn't work" is not very informative.
    I think this should be added to the "Please read this" thread ...something like "Please do not say don't work...blah".... however, even so, no one seem to read that thread.

    contrex

    • Guest
    Re: Writing BAT file to start execs
    « Reply #3 on: August 26, 2007, 12:17:17 AM »
    You get these people who, after you've typed a 200 word guide to fix their problem, they just answer "Naw, doesn't work", and then expect you to guess what error messages they got. I am sure Coronadesign is not like that though.