Reference/IfFileExists: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
mNo edit summary |
|||
| Line 7: | Line 7: | ||
<highlight-nsis>IfFileExists $WINDIR\notepad.exe 0 +2 | <highlight-nsis>IfFileExists $WINDIR\notepad.exe 0 +2 | ||
MessageBox MB_OK "notepad is installed"</highlight-nsis> | MessageBox MB_OK "notepad is installed"</highlight-nsis> | ||
''Command introduced with NSIS v1.1n'' | |||
Latest revision as of 20:13, 4 June 2013
IfFileExists
file_to_check_for jump_if_present [jump_otherwise]
Checks for existence of file(s) file_to_check_for (which can be a wildcard, or a directory), and Gotos jump_if_present if the file exists, otherwise Gotos jump_otherwise. If you want to check to see if a file is a directory, use IfFileExists DIRECTORY\*.*
IfFileExists $WINDIR\notepad.exe 0 +2 MessageBox MB_OK "notepad is installed"
Command introduced with NSIS v1.1n