This file at LIBREOFFICE_PROGRAMFILES\program\desktophelper.txt is really useful?
@Andras? https://cgit.freedesktop.org/libreoffice/core/commit/?id=7d97ec9a3eba9ceacbea631a56185e40b62fdec7
Yes, desktophelper.txt is important. As it says, '# File used for desktop link'. It used by the Windows installer to create desktop launcher icon for LibreOffice.
It is hard to believe this is a normal/clean way to do it, that is why I asked for it with this post—with little detail I admit, I think it is more a workaround, no?
See the documentation of MSI Shortcut table: https://msdn.microsoft.com/en-us/library/windows/desktop/aa371847(v=vs.85).aspx Component_ The external key into the first column of the Component table. The installer uses the installation state of the component specified in this column to determine whether the shortcut is created or deleted. This component must have a valid key path for the shortcut to be installed. Our requirement is that desktop icon should be optional, therefore we cannot use e.g. soffice.exe, we need the conditionally installed desktophelper.txt. I can imagine that it can be done in a different way, but what would be the benefit?
Maybe with “HKEY_LOCAL_MACHINE\SOFTWARE\LibreOffice” and put a value which could help you for this case, especially if this is the only case for this kind of technique. If this can work, it will be more correct I think—which is probably the only benefit. If this can work and it is not specially disturbing to do, I think you should consider this approach.