logoalt Hacker News

Why a program doesn't work when run from a batch file, but works when clicked

34 points • by ibobev • last Monday at 9:14 PM • 5 comments • view on HN

Comments

tveita • today at 10:36 AM

How much are these customers paying for support to have Raymond Chen on first level support to debug their batch files?

➕ show 2 replies
xg15 • today at 10:33 AM

> Explorer sets the current directory of the program to the directory containing the thing that you double-clicked

I found the linked article to informative and confirming my suspicion: "The thing that you clicked" doesn't have to be the executable - it could also be a document with the executable registered as launch handler, in which case the current directory will be the directory of the document.

Would be interesting to know how links and items in shell namespaces are handled.