The Executing Application's Path: How do I determine it In Winbatch?
Posted on 2006-05-23
I'm using Winbatch to execute other programs all in the same directory. We are allowing the user to choose the path. When the user executes one of these utilities from the chosen subdirectory, we would like to be able to find out what the path of the currently executing program is. All the other programs will be found in the same place, so once we have that information we are home free. We can imagine several other ways to accomplish this, but since we know how to do this in faciliteis other than Winbatch, we are hoping that we can do it directly in Winbatch. If we use another programming language and call such a program, if we want to put this auxillary program in the same path as the Winbatch modules, then we have exactly the same problem. Putting such a program in a fixed location such as the root directory of the C: drive solves the problem, but inelegantly as we see it.