When you perform a "View file" command, WinRAR shows the contents of the file under the cursor in the internal viewer window regardless of the file contents or configuration settings, but if you were to press Enter on a file name, several different results are possible. If the file under the cursor is an archive, WinRAR will open it and display its contents, otherwise further actions depend upon them settings specified in Viewer settings dialog. With this dialog you may force WinRAR to always use the internal viewer, to open the file in the external viewer, to call a program associated by Windows with this file type or to ask, each time before viewing the file, which action described above should be executed.
WinRAR can be used to view normal files, whether in an archive or not. If an external program is called to view an archived file, WinRAR unpacks this file to a temporary folder, passes its name to the external program and waits for the program to terminate. After this WinRAR tests the file modification time and if it was updated, offers to update this file in the archive and then deletes the temporary folder with the extracted file.
Note that the scheme described above is slightly modified, when Enter is pressed on an archived file, which has .exe extension. In this case WinRAR extracts not only this file, but the complete contents of the archive to the temporary folder and then runs the executable file. The following steps are similar to those described above: WinRAR waits for the executable to terminate, then tests the modification time of the extracted files and if changed or if new files were created, offers to update the archive. The temporary folder and it›s contents are then deleted. This method of processing .exe files allows programs to be run directly from an archive. For example, you may use it to install new programs without unpacking a distributive manually, simply enter to an archive and press Enter on setup.exe or install.exe program.
See also: