Archive: Running a file that is packed in the installer


Running a file that is packed in the installer
Please let me know if this is possible:

During installation, I wish to get inputs from the user and pass these inputs to a file (packed within the installer - meaning to say this is a file which has been compiled within the installer and would be copied to the target machine after validation) for validation.

The validation process would require the execution of an external/3rd party application (which can be assumed to exist on the target machine).

Does anyone have any idea if this can be done and How can it be done?
Thanks.


Use Exec, ExecWait, ExecShell or nsExec (a plug-in). I would recommend making that executable a plug-in if it's for validation only, will be faster.


Hi, I reckon the use of Exec is feasible however, may I know how do it refer to the file that is packed within the installer? As it has yet to be copied into the target machine, $INSTDIR won't work, would it?

As of now I am still not able to make the file into an executable plugin, so I believe I do not have it as an option yet.

Thanks.



Extract it to $PLUGINSDIR (initialize it first using InitPluginsDir), and execute it from there. It will be automatically deleted when the installer finishes.


I guess this may be a stupid question, but may I know how do I extract a particular file to the PLUGINSDIR?
Thanks.:o


SetOutPath $PLUGINSDIR
File thefilename.exe

or this may even work...

File /oname="$PLUGINSDIR/thefilename.exe" thefilename.exe

I don't have time to check these but you get the general idea. The File command both includes a file AND extracts it, it has a different meaning to makensis than when it is running in the compiled installer.


Should be:

File "/oname=$PLUGINSDIR/thefilename.exe" thefilename.exe

SetOutPath works too.

Just don't forget to use InitPluginsDir first.


Hi,

Thanks for the response.
However, it seems like only SetOutPath works for me.

File "/oname=$PLUGINSDIR/thefilename.exe" thefilename.exe
doesn't work.

But since something works.I am fine. Thanks. :)


Like I said:

Should be:

File "/oname=$PLUGINSDIR\thefilename.exe" thefilename.exe

Hi,
Both ways (\ slash or / slash) didnt work.
But its fine using SetOutPath.
Thanks.


It's not only the \ it's the quote around the entire thing not just the $PLUGINSDIR\filename.exe.