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

cmd, Run and paths

Options
  • 03-04-2009 4:37pm
    #1
    Registered Users Posts: 6,465 ✭✭✭


    Stupid Friday afternoon question.

    Windows XP, if I type "notepad <filename>" in the Run box, it opens the file in Notepad.
    Same as for "winword <filename>".

    But if I call cmd to open a command window, and try within that, notepad works but winword doesn't.

    I presume if I want winword to work from the command line, I'll have to add the path (or add it to %PATH%), whereas the Run dialog doesn't care about the path and will automagically find it regardless?


Comments

  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    The run command does use the path as well, but it also uses extra locations. Off the top of my head, I think it also uses the list of applications registered against file types.


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    If it is a word document just do..

    start xxx.doc

    or just...

    xxx.doc

    That should work as well.


  • Registered Users Posts: 6,465 ✭✭✭MOH


    Hobbes wrote: »
    If it is a word document just do..

    start xxx.doc

    or just...

    xxx.doc

    That should work as well.

    Good man, 'start winword <filename>' will do it. Thanks!

    (Should have mentioned I'm actually trying to call winword remotely in a script from another OS, I'm not just trying to find awkward ways to open a word doc!)


Advertisement