We're getting the following error when installing KeePass 2.3.x using ConfigMgr, which uses the SYSTEM context to install:
Internal error: Failed to expand shell folder constant "userdesktop"
The first installation always fails. The second time, however, it works.
Probably an issue with innosetup as other people have reported it for different apps:
https://winscp.net/forum/viewtopic.php?t=23278
Log file as follows:
2018-02-20 12:06:57.206 Log opened. (Time zone: UTC+11:00)
2018-02-20 12:06:57.206 Setup version: Inno Setup version 5.5.9 (u)
2018-02-20 12:06:57.206 Original Setup EXE: C:\Windows\ccmcache\3n\KeePassSetup.exe
2018-02-20 12:06:57.206 Setup command line: /SL5="$302C8,2598621,121344,C:\Windows\ccmcache\3n\KeePassSetup.exe" /VERYSILENT /DIR="C:\Program Files (x86)\KeePass Password Safe" /LOG="C:\Windows\CCM\LOGS\Install_KeePassPasswordSafe_2.34.log"
2018-02-20 12:06:57.206 Windows version: 10.0.16299 (NT platform: Yes)
2018-02-20 12:06:57.206 64-bit Windows: Yes
2018-02-20 12:06:57.206 Processor architecture: x64
2018-02-20 12:06:57.206 User privileges: Administrative
2018-02-20 12:06:57.209 64-bit install mode: No
2018-02-20 12:06:57.228 Created temporary directory: C:\TEMP\is-MBQHB.tmp
2018-02-20 12:06:57.517 Warning: SHGetFolderPath failed with code 0x80070002 on folder 0x8010
2018-02-20 12:06:57.517 Exception message:
2018-02-20 12:06:57.517 Message box (OK):
Internal error: Failed to expand shell folder constant "userdesktop"
This might be a good solution here:
Happy to assist with verifying that any solution works, as some users just give up and don't click Install the second time to achieve a successful installation.
The setup is intended for regular users. For more complex installation scenarios like yours, I'd recommend using the MSI.
I'd expect the normal setup to consistently work or not; random failing sounds like a bug in Inno Setup or a system/profile problem to me.
Best regards,
Dominik