RaelB
RaelB

Reputation: 3481

Is it possible to get the path of a bat file that invokes an application?

For example my console application is here:

C:\Users\User\Documents\Embarcadero\Studio\Projects\Console App Test\Win32\Debug\ConsoleAppTest.exe

I have a bat file at `C:\Temp\exec.bat' that will invoke the console application:

Content of bat file:

"C:\Users\User\Documents\Embarcadero\Studio\Projects\Console App Test\Win32\Debug\ConsoleAppTest.exe"

With Delphi, in the console application, is it possible for me to "know" that the console application was started by C:\Temp\exec.bat? More specifically, from the path C:\Temp?

Upvotes: 0

Views: 154

Answers (1)

fpiette
fpiette

Reputation: 12312

Simple answer: No, you can't get the path to the bat that invoked the application.

According to the comments you are on a wrong track to achieve your goal (not clearly defined anyway).

Upvotes: 1

Related Questions