According to the logs, it looks like you are installing WinMerge silently using software like System Center Configuration Manager instead of the usual way.
Is this my guess correct?
When I do a silent installation with administrative privileges, I get the following log output.
2020-06-05 22:08:00.493 Log opened. (Time zone: UTC+09:00)
2020-06-05 22:08:00.493 Setup version: Inno Setup version 5.6.1 (u)
2020-06-05 22:08:00.493 Original Setup EXE: c:devwinmergeBuildReleasesWinMerge-2.16.6-x64-Setup_no_support_for_per-user_installation.exe
2020-06-05 22:08:00.493 Setup command line: /SL5="$151FCA,6798723,121344,c:devwinmergeBuildReleasesWinMerge-2.16.6-x64-Setup_no_support_for_per-user_installation.exe" /VERYSILENT /NOCLOSEAPPLICATIONS /NORESTARTAPPLICATIONS /NORESTART /SP- /SUPPRESSMSGBOXES /LOG=C:tmpWinMerge-2.16.6-x64-Setup_no_support_for_per-user_installation.exe.log
2020-06-05 22:08:00.493 Windows version: 10.0.19041 (NT platform: Yes)
2020-06-05 22:08:00.493 64-bit Windows: Yes
2020-06-05 22:08:00.493 Processor architecture: x64
2020-06-05 22:08:00.493 User privileges: Administrative
2020-06-05 22:08:00.501 64-bit install mode: Yes
2020-06-05 22:08:00.508 Created temporary directory: C:UserssawanAppDataLocalTempis-EP6BD.tmp
2020-06-05 22:08:00.516 -- DLL function import --
2020-06-05 22:08:00.516 Function name: GetSysColor
2020-06-05 22:08:00.516 DLL name: user32.dll
2020-06-05 22:08:00.516 Dest DLL name: user32.dll
2020-06-05 22:08:00.516 Importing the DLL function.
2020-06-05 22:08:00.516 Successfully imported the DLL function. Delay loaded? No
2020-06-05 22:08:01.376 Starting the installation process.
2020-06-05 22:08:01.432 Directory for uninstall files: C:Program FilesWinMerge
....
One interesting difference from your log is that the Created temporary directory line in your log does not include the user’s name.
Perhaps the account that installs WinMerge is not the same account that performs the usual GUI operations.
So I assume it is a failed attempt to get the desktop folder path.
Install as a normal user or pull requests are welcome.
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:Windowsccmcache3nKeePassSetup.exe
2018-02-20 12:06:57.206 Setup command line: /SL5=»$302C8,2598621,121344,C:Windowsccmcache3nKeePassSetup.exe» /VERYSILENT /DIR=»C:Program Files (x86)KeePass Password Safe» /LOG=»C:WindowsCCMLOGSInstall_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:TEMPis-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:
https://stackoverflow.com/questions/28635548/avoiding-failed-to-expand-shell-folder-constant-userdocs-errors-in-inno-setup/28636660#28636660
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.
I am trying to install the docker toolbox on Window 8.1 Enterprise , but getting the following error.
asked Jul 5, 2016 at 11:38
![]()
MANISH PATHAKMANISH PATHAK
2,5924 gold badges27 silver badges31 bronze badges
This could be related to issue 435, which is followed by a pending PR 441
Change replaces ‘
userdocs‘ variable usage with ‘userappdata‘ to account for users with ‘My Documents‘ locations which are not the default windows location.
(userdocs is currently used in windows/Toolbox.iss#L239-L244)
answered Jul 5, 2016 at 13:13
![]()
Workaround:
-Open SystemControl->System->Advanced Settings->Environment Settings
-add new Key «USERDOCS» pointing to a valid Path
-restart the installer completely to activate the var
answered Aug 7, 2016 at 16:37
As per Q28635548, for my case (working on a virtualized domain Windows 7 client) it helped to use regedit to (temporarily) modify the registry key with name
[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerUser Shell Folders]Personal into a directory that is currently available (e.g. some local path when if you’re currently disconnected from the domain)
answered Nov 15, 2016 at 14:19
![]()
krevelenkrevelen
3613 silver badges10 bronze badges
- CoachKA
- Joined:
- 2013-09-16
- Posts:
- 2
2013-09-16 20:08
I am trying to install WinSCP version 5.1.7 on a Windows 7 Enterprise HP laptop. I have selected the default installation settings and receive the following error: Internal error: Failed to expand shell folder constant «userdesktop». My Desktop, Favorites and Personal/Documents directories are on a network drive. I have updated the registry entries, but I still receive the error.
Here is the log file from my last install attempt:
2013-09-16 11:11:18.846 Log opened. (Time zone: UTC-07:00)
2013-09-16 11:11:18.846 Setup version: Inno Setup version 5.4.3 (u)
2013-09-16 11:11:18.846 Original Setup EXE: C:UsersxxxxxDownloadswinscp517setup.exe
2013-09-16 11:11:18.846 Setup command line: /SL5=»$C093E,4520388,140800,C:UsersxxxxxDownloadswinscp517setup.exe» /SPAWNWND=$A06B2 /NOTIFYWND=$1405BA /log=»winscpinst.log» /saveinf=»instsave.txt»
2013-09-16 11:11:18.846 Windows version: 6.1.7601 SP1 (NT platform: Yes)
2013-09-16 11:11:18.846 64-bit Windows: Yes
2013-09-16 11:11:18.846 Processor architecture: x64
2013-09-16 11:11:18.846 User privileges: Administrative
2013-09-16 11:11:20.221 64-bit install mode: No
2013-09-16 11:11:20.221 Created temporary directory: C:UsersxxxxxAppDataLocalTempis-GS4TG.tmp
2013-09-16 11:11:28.771 License accepted
2013-09-16 11:11:35.992 Starting the installation process.
2013-09-16 11:11:35.992 Warning: SHGetFolderPath failed with code 0x80070003 on folder 0x8010
2013-09-16 11:11:35.992 Fatal exception during installation process (Exception):
Internal error: Failed to expand shell folder constant «userdesktop»
2013-09-16 11:11:35.992 Exception message:
2013-09-16 11:11:35.992 Message box (OK):
Internal error: Failed to expand shell folder constant «userdesktop»
2013-09-16 11:11:38.835 User chose OK.
2013-09-16 11:11:38.835 Message box (OK):
Setup was not completed.
Please correct the problem and run Setup again.
2013-09-16 11:11:40.641 User chose OK.
2013-09-16 11:11:40.641 Rolling back changes.
2013-09-16 11:11:40.641 Starting the uninstallation process.
2013-09-16 11:11:40.641 Uninstallation process succeeded.
2013-09-16 11:11:42.149 Deinitializing Setup.
2013-09-16 11:11:42.149 Preparing intallation report
2013-09-16 11:11:42.149 Sending installation report: <invalid hyperlink removed by admin>
2013-09-16 11:11:42.492 Installation report send result: 200 OK
2013-09-16 11:11:42.507 Log closed.
Reply with quote
Advertisement
-
martin◆
Site Admin -
- Joined:
- 2002-12-10
- Posts:
- 39,025
- Location:
- Prague, Czechia
2013-09-19
Reply with quote
- Guest
2013-09-19 16:29
Thank you for the suggestion. I saw this post, but Windows 7 doesn’t have the same issues as Windows XP.
I actually solved the issues late yesterday. The shell folder for my desktop was updated with a mapped drive reference. I had to update the reference to a fully qualified/UNC reference. I was able to install the WinSCP client.
Reply with quote
-
nick0208
Guest
2016-02-08 20:27
I get the following error on Windows 10 when installing via the system account or SCCM «Failed to expand shell folder constant “userprograms” — “SHGetFolderPath failed with code 0x80070002»
This error only happens when installing with the System account or SCCM the first 2 times on Windows 10. If install with just the administrators account it doesn’t happen at all. In addition,
SHGetFolderPath has been a deprecated function since Windows Vista.
2016-02-03 15:05:14.549 Log opened. (Time zone: UTC-05:00)
2016-02-03 15:05:14.549 Setup version: Inno Setup version 5.5.5 (u)
2016-02-03 15:05:14.549 Original Setup EXE: C:WindowsTempWinSCPWINSCP~1.EXE
2016-02-03 15:05:14.549 Setup command line: /SL5=»$1001BE,5331554,166912,C:WindowsTempWINSCP~1.EXE» /VERYSILENT /LOADINF=64bit.inf /NORESTART /NOCANDY /LOADINF=64bit.inf /LOG=C:PROGRA~2PkglogsWinSCPWINSCP~1.6Vendor_INST.LOG
2016-02-03 15:05:14.549 Windows version: 6.3.9600 (NT platform: Yes)
2016-02-03 15:05:14.549 64-bit Windows: Yes
2016-02-03 15:05:14.549 Processor architecture: x64
2016-02-03 15:05:14.549 User privileges: Administrative
2016-02-03 15:05:14.549 64-bit install mode: No
2016-02-03 15:05:14.549 Created temporary directory: C:WINDOWSTEMPis-VJQCH.tmp
2016-02-03 15:05:17.221 Extracting temporary file: C:WINDOWSTEMPis-VJQCH.tmpcommander.bmp
2016-02-03 15:05:17.550 Extracting temporary file: C:WINDOWSTEMPis-VJQCH.tmpexplorer.bmp
2016-02-03 15:05:17.878 Extracting temporary file: C:WINDOWSTEMPis-VJQCH.tmppaypalcard.bmp
2016-02-03 15:05:17.878 License accepted
2016-02-03 15:05:17.878 Warning: SHGetFolderPath failed with code 0x80070002 on folder 0x8002
2016-02-03 15:05:17.878 Exception message:
2016-02-03 15:05:17.878 Message box (OK):
Internal error: Failed to expand shell folder constant «userprograms»
2016-02-03 15:05:51.993 User chose OK.
2016-02-03 15:05:51.993 Deinitializing Setup.
2016-02-03 15:05:51.993 Preparing intallation report
2016-02-03 15:05:51.993 Sending installation report: <link removed by admin>
2016-02-03 15:05:52.008 Error sending installation report: WinHttp.WinHttpRequest: The server name or address could not be resolved
2016-02-03 15:05:52.805 Log closed.
Reply with quote
-
martin◆
Site Admin -
- Joined:
- 2002-12-10
- Posts:
- 39,025
- Location:
- Prague, Czechia
2016-02-10
Thanks for your report.
Can you send me an email, so I can send you back a development version of WinSCP for testing? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.
You will find my address (if you log in) in my forum profile.
Reply with quote
Advertisement
-
martin◆
Site Admin -
2016-02-16
This bug has been added to the tracker:
https://winscp.net/tracker/1398
Reply with quote
Advertisement
Internal Error: “Failed to Expand Shell Folder Constant”
SYMPTOMS
While installing Genie Backup Manager (GBM) on Windows Vista, the following error occurs with the message:
Internal Error: Failed to expand shell folder constant “userappdata”
CAUSE
This problem is caused by a Vista conflict.
RESOLUTION
Set the My Documents folder to its default values as follows:
Using Windows Explorer, right-click the My Documents folder → Properties → Select the option for returning the position to its default value.
C:Documents and settings → All Users Documents → under properties you will see attributes and the settings for “read-only”
Setting back the default value for My Documents is just a workaround, which usually fixes the default read/write rights for the My Documents folder.
APPLIES TO: Genie Backup Manager (GBM).
