Executable Names

BlitzPlus Forums/BlitzPlus Beginners Area/Executable Names

Alaric(Posted 2006) [#1]
Is there any way to tell the name of a program from inside of it? As in, if some retard renamed the program from its original name and you wanted to create a backup of the program from inside of itself, how would you tell the new name of the program?


Pineapple(Posted 2006) [#2]
Read the directory the app is in, find exe files, open them up for reading, search for a pre-defined tag (say a string... Class names are good'uns, but useless in Blitz, as you cannot predefine your own), if the string is in the file, erm, back up said file!


Andres(Posted 2006) [#3]
Another way is to check the size of the executable in the directory.


xlsior(Posted 2006) [#4]
IIRC, one of the environment variables will contain the name of the running .EXE, and you can check those from within blitzplus.