Archive: Query whether MS Excel is installed or not


Query whether MS Excel is installed or not
Hello,

first I would like to apologize for my bad English, i come from Germany so a bit charity about my grammar/spelling/vocabulary would be nice :)

Ive made a script for NSIS, which installs a program which exports Excel tables from *.ini files. Now my only problem is that my program needs Excel to work, so I would like to include a simple query before the installation starts, whether MS Excel is installed and an automatically exit of the installation if it's not.
Im not very familiar with NSIS and really dont have an idea how to solve that problem.

I appreciate any help on this topic. If you have any further questions feel free to ask.

Kind regards,
Dasluch


You can use this script to check if Excel is installed:

  ClearErrors
EnumRegKey $0 HKCR "Excel.Application" 0
IfErrors error
MessageBox MB_OK "Excel is installed"
Goto done
error:
MessageBox MB_OK "Excel is not installed"
done:
ClearErrors
It checks if the key "HKEY_CLASSES_ROOT\Excel.Application" exists.
(Idea from http://www.devx.com/vb2themax/Tip/19507)

Regards,
JP