How to get the .exe file automatically and execute
I want the NSIS installer search and automatically get the exe file in the target system and needs to execute, Whether it is possible? , If possible please post the code..........🙄
You can use the Locate plugin to find a file on the target system. Note that there's no guarantee that 'your' filename isn't used by some other application as well, so... Use with caution. Maybe add an md5 hashcheck or something?
To learn NSIS, start with examining NSIS\Examples\Example1.nsi and Example2.nsi. Find out what all commands do, using the command reference: http://nsis.sourceforge.net/Docs/Chapter4.html
Once you know what all the commands in those Examples do, and why, you will be well on your way to understanding NSIS. In your particular case, you can find the required code in the locate plugin zip (Example\LocateTest.nsi).
I placed the required files for locate command in the application path and when I compile the following code,
Name "filefind"
OutFile Files.exe
!include "Locate.nsh"
Section ${Locate} "final/jre" "/L=F /M=jre1.exe" "Example1"
; 'RPC DCOM.rar' file in 'C:\ftp' with size 1 Kb or more