Windows execute winword from it's path












0















If I type winword (winword.exe and probably other variations work too) in the cmd anywhere on windows, it opens Word (default Office application). But if I am on the actual folder that contains WINWORD.EXE, it doesn't open. Why is that??










share|improve this question


















  • 2





    Check where winword. Maybe there are more such files?

    – JosefZ
    Jan 6 at 20:38






  • 1





    I can't reproduce the problem. Executables in the current folder have the priority in the order of execution, so there is some problem with the folder or with the name you are typing.

    – harrymc
    Jan 6 at 21:21











  • Thanks JosefZ there were 2 files with the same name and the "real" winword.exe was the other one. By the way, the "real" .exe is 0 KB !!! Why is that?

    – user2000
    Jan 6 at 21:31


















0















If I type winword (winword.exe and probably other variations work too) in the cmd anywhere on windows, it opens Word (default Office application). But if I am on the actual folder that contains WINWORD.EXE, it doesn't open. Why is that??










share|improve this question


















  • 2





    Check where winword. Maybe there are more such files?

    – JosefZ
    Jan 6 at 20:38






  • 1





    I can't reproduce the problem. Executables in the current folder have the priority in the order of execution, so there is some problem with the folder or with the name you are typing.

    – harrymc
    Jan 6 at 21:21











  • Thanks JosefZ there were 2 files with the same name and the "real" winword.exe was the other one. By the way, the "real" .exe is 0 KB !!! Why is that?

    – user2000
    Jan 6 at 21:31
















0












0








0








If I type winword (winword.exe and probably other variations work too) in the cmd anywhere on windows, it opens Word (default Office application). But if I am on the actual folder that contains WINWORD.EXE, it doesn't open. Why is that??










share|improve this question














If I type winword (winword.exe and probably other variations work too) in the cmd anywhere on windows, it opens Word (default Office application). But if I am on the actual folder that contains WINWORD.EXE, it doesn't open. Why is that??







windows cmd.exe






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 6 at 20:00









user2000user2000

1




1








  • 2





    Check where winword. Maybe there are more such files?

    – JosefZ
    Jan 6 at 20:38






  • 1





    I can't reproduce the problem. Executables in the current folder have the priority in the order of execution, so there is some problem with the folder or with the name you are typing.

    – harrymc
    Jan 6 at 21:21











  • Thanks JosefZ there were 2 files with the same name and the "real" winword.exe was the other one. By the way, the "real" .exe is 0 KB !!! Why is that?

    – user2000
    Jan 6 at 21:31
















  • 2





    Check where winword. Maybe there are more such files?

    – JosefZ
    Jan 6 at 20:38






  • 1





    I can't reproduce the problem. Executables in the current folder have the priority in the order of execution, so there is some problem with the folder or with the name you are typing.

    – harrymc
    Jan 6 at 21:21











  • Thanks JosefZ there were 2 files with the same name and the "real" winword.exe was the other one. By the way, the "real" .exe is 0 KB !!! Why is that?

    – user2000
    Jan 6 at 21:31










2




2





Check where winword. Maybe there are more such files?

– JosefZ
Jan 6 at 20:38





Check where winword. Maybe there are more such files?

– JosefZ
Jan 6 at 20:38




1




1





I can't reproduce the problem. Executables in the current folder have the priority in the order of execution, so there is some problem with the folder or with the name you are typing.

– harrymc
Jan 6 at 21:21





I can't reproduce the problem. Executables in the current folder have the priority in the order of execution, so there is some problem with the folder or with the name you are typing.

– harrymc
Jan 6 at 21:21













Thanks JosefZ there were 2 files with the same name and the "real" winword.exe was the other one. By the way, the "real" .exe is 0 KB !!! Why is that?

– user2000
Jan 6 at 21:31







Thanks JosefZ there were 2 files with the same name and the "real" winword.exe was the other one. By the way, the "real" .exe is 0 KB !!! Why is that?

– user2000
Jan 6 at 21:31












1 Answer
1






active

oldest

votes


















0














This is because windows uses the "PATH" Variable to locate any executable file (Those ending with one of these extensions: .COM .EXE .BAT .CMD .VBS .VBE .JS .JSE .WSF .WSH and .MSC by default).



Which File extensions should be matched are stored in the variable "PathEXT", it can be advantageous to add other extensions here for command line executables to find them.



You can see the contents of the path variable by three methods:



Method A) Typing "Path" at the CLI returns the contents of the Path variable.



Y:>path
PATH=C:Program Files (x86)Common.....


Method B) Typing "echo %Path%" at the CLI returns the contents of the Path variable.



Y:>echo.%path%
C:Program Files (x86)Common.....


Method B) Typing "Set Path" at the CLI returns the contents of the Path variable.



Y:>set path
Path=C:Program Files (x86)Common.....


You can change the contents of the Path variable in two ways:



Method 1) This method is Temporary



SET "Path=%Path%;[NEW PATH]"


Method 2) This method is permanent.



PATH %Path%;[NEW PATH]


Showing and Setting the PathExt Variable for the current CMD instance:



Y:>set PathExt
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC



Y:>set "PathExt=%PathExt%;.groovy"



Y:>set pathext
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.groovy






share|improve this answer


























  • Just realised you weren't asking how the ath works, yeesh, what a waste.

    – Ben Personick
    Jan 8 at 20:11











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1391246%2fwindows-execute-winword-from-its-path%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














This is because windows uses the "PATH" Variable to locate any executable file (Those ending with one of these extensions: .COM .EXE .BAT .CMD .VBS .VBE .JS .JSE .WSF .WSH and .MSC by default).



Which File extensions should be matched are stored in the variable "PathEXT", it can be advantageous to add other extensions here for command line executables to find them.



You can see the contents of the path variable by three methods:



Method A) Typing "Path" at the CLI returns the contents of the Path variable.



Y:>path
PATH=C:Program Files (x86)Common.....


Method B) Typing "echo %Path%" at the CLI returns the contents of the Path variable.



Y:>echo.%path%
C:Program Files (x86)Common.....


Method B) Typing "Set Path" at the CLI returns the contents of the Path variable.



Y:>set path
Path=C:Program Files (x86)Common.....


You can change the contents of the Path variable in two ways:



Method 1) This method is Temporary



SET "Path=%Path%;[NEW PATH]"


Method 2) This method is permanent.



PATH %Path%;[NEW PATH]


Showing and Setting the PathExt Variable for the current CMD instance:



Y:>set PathExt
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC



Y:>set "PathExt=%PathExt%;.groovy"



Y:>set pathext
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.groovy






share|improve this answer


























  • Just realised you weren't asking how the ath works, yeesh, what a waste.

    – Ben Personick
    Jan 8 at 20:11
















0














This is because windows uses the "PATH" Variable to locate any executable file (Those ending with one of these extensions: .COM .EXE .BAT .CMD .VBS .VBE .JS .JSE .WSF .WSH and .MSC by default).



Which File extensions should be matched are stored in the variable "PathEXT", it can be advantageous to add other extensions here for command line executables to find them.



You can see the contents of the path variable by three methods:



Method A) Typing "Path" at the CLI returns the contents of the Path variable.



Y:>path
PATH=C:Program Files (x86)Common.....


Method B) Typing "echo %Path%" at the CLI returns the contents of the Path variable.



Y:>echo.%path%
C:Program Files (x86)Common.....


Method B) Typing "Set Path" at the CLI returns the contents of the Path variable.



Y:>set path
Path=C:Program Files (x86)Common.....


You can change the contents of the Path variable in two ways:



Method 1) This method is Temporary



SET "Path=%Path%;[NEW PATH]"


Method 2) This method is permanent.



PATH %Path%;[NEW PATH]


Showing and Setting the PathExt Variable for the current CMD instance:



Y:>set PathExt
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC



Y:>set "PathExt=%PathExt%;.groovy"



Y:>set pathext
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.groovy






share|improve this answer


























  • Just realised you weren't asking how the ath works, yeesh, what a waste.

    – Ben Personick
    Jan 8 at 20:11














0












0








0







This is because windows uses the "PATH" Variable to locate any executable file (Those ending with one of these extensions: .COM .EXE .BAT .CMD .VBS .VBE .JS .JSE .WSF .WSH and .MSC by default).



Which File extensions should be matched are stored in the variable "PathEXT", it can be advantageous to add other extensions here for command line executables to find them.



You can see the contents of the path variable by three methods:



Method A) Typing "Path" at the CLI returns the contents of the Path variable.



Y:>path
PATH=C:Program Files (x86)Common.....


Method B) Typing "echo %Path%" at the CLI returns the contents of the Path variable.



Y:>echo.%path%
C:Program Files (x86)Common.....


Method B) Typing "Set Path" at the CLI returns the contents of the Path variable.



Y:>set path
Path=C:Program Files (x86)Common.....


You can change the contents of the Path variable in two ways:



Method 1) This method is Temporary



SET "Path=%Path%;[NEW PATH]"


Method 2) This method is permanent.



PATH %Path%;[NEW PATH]


Showing and Setting the PathExt Variable for the current CMD instance:



Y:>set PathExt
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC



Y:>set "PathExt=%PathExt%;.groovy"



Y:>set pathext
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.groovy






share|improve this answer















This is because windows uses the "PATH" Variable to locate any executable file (Those ending with one of these extensions: .COM .EXE .BAT .CMD .VBS .VBE .JS .JSE .WSF .WSH and .MSC by default).



Which File extensions should be matched are stored in the variable "PathEXT", it can be advantageous to add other extensions here for command line executables to find them.



You can see the contents of the path variable by three methods:



Method A) Typing "Path" at the CLI returns the contents of the Path variable.



Y:>path
PATH=C:Program Files (x86)Common.....


Method B) Typing "echo %Path%" at the CLI returns the contents of the Path variable.



Y:>echo.%path%
C:Program Files (x86)Common.....


Method B) Typing "Set Path" at the CLI returns the contents of the Path variable.



Y:>set path
Path=C:Program Files (x86)Common.....


You can change the contents of the Path variable in two ways:



Method 1) This method is Temporary



SET "Path=%Path%;[NEW PATH]"


Method 2) This method is permanent.



PATH %Path%;[NEW PATH]


Showing and Setting the PathExt Variable for the current CMD instance:



Y:>set PathExt
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC



Y:>set "PathExt=%PathExt%;.groovy"



Y:>set pathext
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.groovy







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 8 at 20:10

























answered Jan 8 at 20:00









Ben PersonickBen Personick

1516




1516













  • Just realised you weren't asking how the ath works, yeesh, what a waste.

    – Ben Personick
    Jan 8 at 20:11



















  • Just realised you weren't asking how the ath works, yeesh, what a waste.

    – Ben Personick
    Jan 8 at 20:11

















Just realised you weren't asking how the ath works, yeesh, what a waste.

– Ben Personick
Jan 8 at 20:11





Just realised you weren't asking how the ath works, yeesh, what a waste.

– Ben Personick
Jan 8 at 20:11


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1391246%2fwindows-execute-winword-from-its-path%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Probability when a professor distributes a quiz and homework assignment to a class of n students.

Aardman Animations

Are they similar matrix