c# - In a drap and drop between explorer and your app, how to know your app directory? -


i have little command line app tool xyz.exe accepts filename f argument , call program abc.exe lives in same folder xyz.exe data argument plus f.

the ideia drag , drop file windows explorer program calls abc.exe proper parameters. when drop program, mean drop file abc.exe, runs filename argument.

the problem need way know in folder abc.exe is. know same folder xyz.exe, seems in drag , drop operations environment.currentdirectory show windows folder instead of folder abc.exe/xyz.exe reside.

how can solve this?

you can :

path.getdirectoryname(assembly.getexecutingassembly().location)

to find current directory.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -