/* Collection of code snippets by Arne Vajhøj */
/* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) */
#include <windows.h>
#include <stdio.h>
#include <string.h>

int main()
{
   char buf[1000];
   GetModuleFileName(NULL,buf,sizeof(buf));
   *(strrchr(buf,'\\')+1) = '\0';
   printf("%s\n",buf);
   return 0;
}
