Skip to content
⌘ NSIS Forum Archive

A way to get a list of all the files that will be installed?

4 posts

ancaritha#

A way to get a list of all the files that will be installed?

I was wondering if there was a way to get a list of all the files that are going to be installed?

Basically, I want to start signing all of the .dll files and .exe files that we make. I already sign the installers, but want to add this step to the process. The easiest way to do it would to be include it in the NSIS install scripts. We have a lot of these scripts that are already set up with a bunch of common functions located in a common .nsh file, so if I could add something into one of the common function blocks, I could update every installer scripts at once instead of hand editing 20+ files, which is error prone.

Every installer script is going to have a block like this:
File "..\..\bin\ProgramA\*.exe"
File "..\..\bin\ProgramA\*.dll"​

Ideally I'd be able to do something like...

for each 'file'
call 'sign.bat' with 'file'

I can't find any way to retrieve the list of files that will be installed... Is that possible? Is there another way that people suggest? My plan for the time being is to go updated a dozen or two Visual Studios projects to add some post build steps, but I'd rather do it this way.

Thanks!
Anders#
There is no list.

You would have to do something like

!macro SignAndInstall wild
!system 'for %A in ("${wild}") do call sign.bat "%~fA"'
File "${wild}"
!macroend
Section
!insertmacro SignAndInstall "foo\bar\*.exe"
SectionEnd 
ancaritha#
Not quote as seamless as I was hoping but it's still a lot better than my fallback option.

Thanks!
ancaritha#
Just wanted to say that the macro you provided macro worked first time and while it wasn't 100% seamless, it was real close. It only took me a few minutes to update every one of my projects with the modified code and the entire process was much simpler (and much harder to mess up) than modifying all my Visual Studios projects.

Thanks a bunch, this saved me a whole lot of time and frustration!