PDA

View Full Version : [ProductName] - what impact does this var have?



NewsArchive
04-16-2020, 01:36 PM
Hello Friedrich and all others,

In my SB-Script I have set the variable [ProductName] to "KiK5" (no doublequotes)

Now I see, that - whoever it did and for what reason at all - "KiK5" turned to KiK 5".

I noticed that after testing my recent installer / updater. The installer did
install well, because I did not notice the change. But when I tried the updater
on an older install, I got an error. Which was correct.

The old program was installed in "C:\KiK5", while the the updater wrote into "C:\KiK 5".

The reason is understandable, because the program path is defined like

%INSTALLDIR%\[ProduktName]in "Apps & Features"

And because [ProductName] has been changed by a moron, the program paths now differ.

What else do I have to check for / have to be aware?

I have not defined a shortcut or program group. What I see is that the option
to uninstall in "Apps & Features" (Win10).

Final question: Does it hurt if I distribute the newly made installer with the
new [ProductName] "KiK 5", but with
%INSTALLDIR%\KiK5 instead of %INSTALLDIR%\[ProductName],
or should I better revert to the original productname?


Regards,
Wolfgang Orth
www.odata.de

Please note:
From time to time it happens, that I overlook a reply to my postings.
Please don't be angry.
In case of an emergency, try to contact me via mail.

Bitte beachten:
Von Zeit zu Zeit passiert es mir, dass ich Antworten auf meine Postings übersehe.
Bitte nicht böse sein.
Im Notfall bitte Kontakt per Mail versuchen.







.

NewsArchive
04-17-2020, 06:20 AM
Wolfgang,

good question.

The [PRODUCTNAME] value is used in Add/Remove Programs (Apps & Features).
If you do not modify the default settings, it's also used in [INSTALLDIR],
[UNINSTALL] and [UNINSTALL_LOG].

And it will be used to set the %_SB_PROGRAMGROUP% variable value in the
script:

Set Variable %_SB_PROGRAMGROUP% to "[PRODUCTNAME]"

The installer registers the installation folder with Windows (information
for "Apps & Features). So when you check for a previous installation using
an updater, this will return the incorrect "KiK 5" in your case. It's
written to the GUID value (which is unique for a product). If you do not
use Detect Previous Version then it's written to "KIK 5".

In theory, if you let the updater check for the previously installed (to
C:\KiK5) then you can use the retrieved value to overwrite "KIK 5".

Keep in mind that the updater writes into a "new" uninstall.log. So this
will break "rollback" capability. That's bad.

To be on the safe side, I would recreate the installer with "KiK5".
SetupBuilder is powerful enough to code around all these issues, but IMO
it's not worth the effort.

Friedrich

NewsArchive
04-17-2020, 06:20 AM
>
>To be on the safe side, I would recreate the installer with "KiK5".
>SetupBuilder is powerful enough to code around all these issues, but IMO
>it's not worth the effort.
>

yeah....

reverted, recompiled, replaced

Thank you, Friedrich!


Regards,
Wolfgang Orth
www.odata.de

Please note:
From time to time it happens, that I overlook a reply to my postings.
Please don't be angry.
In case of an emergency, try to contact me via mail.

Bitte beachten:
Von Zeit zu Zeit passiert es mir, dass ich Antworten auf meine Postings übersehe.
Bitte nicht böse sein.
Im Notfall bitte Kontakt per Mail versuchen.