How a file can be self-extracting?
By being an executable.
Several programs can create self-extracting archives. For Windows there are WinZip, WinRAR, 7-Zip, KGB Archiver, and the built-in IExpress wizard. For Macintosh there are StuffIt, The Unarchiver, and 7zX. There are also programs that create self-extracting archives on Unix as shell scripts which utilizes programs like tar and gzip (which must be present in destination system). Others (like 7-Zip or RAR) can create self-extracting archives as regular executables in ELF format.
Several compression utilities can uncompress the files in specific drive and folder even a password count apply to restrict unzip. First make a zip file than convert it into self extract executable file.