Archive: Determining the name of the installer


Determining the name of the installer
Some preamble:
I am writing an installer for WindowsXP Service Pack 2. When the user clicks to "download" on our site, they download the installer as a signed executable.

The problem:
Sometimes the installer needs to reboot to complete. While I know all I need to do is to add a key under RunOnce in the registry, the problem is that i don't know the exact name of the installer's executable. Since it is downloaded and run by IE, the installer is run from the cache and if there are multiple copies of the same file in the cache, the files are dynamically renamed.

The question:
Does anyone know how to dynamically determine the exact name of the installer if it is renamed (like by IE's cache)?


u could parse $CMDLINE, cant really remember right now if there is a variable with just the exe name...look in the docs :)


The FAQ has an example showing how to get the installer's filename:

http://nsis.sourceforge.net/index.ph...&tx_faq_faq=41


Thank you very much. I had tried GetModuleFileName but was unable to get the appropriate parameters.

Apologies for not checking the FAQ. I had scanned the docs and the forum, but not the FAQ.