#INCLUDE "Win32API.inc" '[...] DIM fullpath AS ASCIIZ * 260, appname AS STRING GetModuleFileNameA 0, fullpath, 260 IF INSTR(fullpath, "\") THEN appname = MID$(fullpath, INSTR(-1, fullpath, "\") + 1) ELSE appname = fullpath END IF