Finding the executable name (minus the extension)

  s :=  ChangeFileExt('Thisisatest.exe', '');