Archive: Product Version MessageBox from start menu shortcut


Product Version MessageBox from start menu shortcut
Hi,
I would like to include in my installer a start menu shortcut to message box with product version information.
Is there any way create a shortcut not to some file, but some function in installer script which will be invoked?(for example function may containing:
MessageBox MB_ICONINFORMATION|MB_OK "Version " "${PRODUCT_VERSION}")?

Thanks and Regards,
Sasa


you could pass something like "/version" as a command line parameter to your installer, check for that in the installer, and if /version is specified, only pop up a messagebox.

You might want to make that a separate installer if your regular installers requires Admin; otherwise just to check the version would pop up UAC on Vista/Se7en, etc.
Ideally you'd write a small app that does it proper :)


Thanks for anwering,
I decided to add another trivial installer which will produce version.exe with desired information and wich I will attach for link in Start Menu.
Now I am facing with new issue:
I would like to implement following line in my "main" installer:

ExecShell "open" '"${NSISDIR}\makensis.exe" version.nsi'

to get version.exe which I will latest in main installer script I will use when I will create shortcut.
Unfortunately, this ExecShell is executing with no errors in log but it doesn't produce expected version.exe file and it causing error later in main installer script when I am trying to copy file which doesn't exist.
Simple call from command line: "C:\Program Files\NSIS\makensis.exe" version.nsi will produce expected version.exe.

Any ideas what I am doing wrong?

Thanks once again,
Sasa


err... you can't do that - unless you're distributing NSIS with your own plugin, too.

Why aren't you just storing the version number in the registry on installation, and then reading that out from there? You should only have to build an executable that reads that out once, locally, and then include that executable in your installer :o


ExecShell is a run time instruction. You need to use !system.

Stu


Stu,
thanks... It is exactly what I was looking for...

Regards,
Sasa


Also just a note on your version.nsi it should probably look something like this:

OutFile version.exe
SilentInstall silent
XPStyle on
Icon ...

Section
MessageBox MB_OK|MB_ICONINFORMATION ...
SectionEnd


That is the most minimal script which will not have any UI resources in it (SilentInstall silent ensures this).

Stu

:D
Yes, exactly... And most important - it's working. ;)

Sasa