Bug 167337 - Can 'install' portable application to path that includes "Program Files" string, but cannot launch
Summary: Can 'install' portable application to path that includes "Program Files" stri...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
25.2.3.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-02 05:36 UTC by DIV
Modified: 2025-07-08 05:07 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Error message (5.44 KB, image/png)
2025-07-02 05:37 UTC, DIV
Details

Note You need to log in before you can comment on or make changes to this bug.
Description DIV 2025-07-02 05:36:04 UTC
Description:
I recently downloaded LibreOffice version 25.2.3.0 Portable MultilingualStandard (*.paf.exe).  I am running Windows 10 (x64).  
Today I ran the EXE file and chose to install to 
C:\Program Files (portable)\LibreOfficePortable
Note that while
C:\Program Files
is a system folder
C:\Program Files (portable)
is a folder that I created myself, with no special properties.  

The EXE file 'installed'/extracted all of the files to the specified path.  

However, when I tried to launch directly from the end-of-installation dialogue box, or when I try to run any of the 'installed' EXE files, I get an error:  
~~~~~
LibreOffice Portable cannot be run from inside C:\Program Files.  This location is for standard local software only.  Please use this application from another location.  
~~~~~

Steps to Reproduce:
1. Download portable installer
2. 'Install' to "C:\Program Files (portable)\LibreOfficePortable"
3. Try to run application.

Actual Results:
Unable to run application.  
Get error in message box:  
~~~~~
LibreOffice Portable cannot be run from inside C:\Program Files.  This location is for standard local software only.  Please use this application from another location.  
~~~~~

Expected Results:
There are THREE problems:  
(i) The documentation does not match the behaviour.  If there is a need to prevent installation into paths such as "C:\Program Files (portable)\LibreOfficePortable", it should be specified in the documentation.  
(ii) The portable installer allows extraction of the files to a path from which they cannot be run.  The criteria to assess the path should be the same for the installer as for the launch algorithm.  If the application would not be launchable from a specified path, then the installer should EITHER refuse to extract to that path OR extract only after showing a warning to the user and asking for specific confirmation.  
(iii) The launch algorithm seems to be incorrectly checking only the first few characters of the path, rather than properly assessing what the top-level directory actually is!!!  This is indicated by the display of the wrong information in the error message!  


Reproducible: Always


User Profile Reset: No

Additional Info:
"Known issues"
Long Paths and Odd Characters - LibreOffice doesn't like running from overly long paths. So, while it will work directly from your desktop... if you have it within a subdirectoy on your desktop, it will probably fail claiming that some files are corrupted. LibreOffice also doesn't like certain characters like dollar signs in the path. This is why it's best to have the LibreOfficePortable directory in the root of your drive, or within a PortableApps directory in the root of your drive. The launcher attempts to check this for you and will let you know.
https://portableapps.com/support/libreoffice_portable

Unable to copy here the information from menu Help - About LibreOffice, because I cannot run the application  :-/
It's obviously not related to the UserProfile.
Comment 1 DIV 2025-07-02 05:37:12 UTC
Created attachment 201600 [details]
Error message
Comment 2 DIV 2025-07-02 05:42:18 UTC
After moving entire directory (using Windows Explorer) to 
"C:\ProgFiles_portable\LibreOfficePortable"
the application launches without error.
Comment 3 m_a_riosv 2025-07-02 23:09:42 UTC
Maybe an issue with Windows antivirus protection. Try to enable in it run the program, adding it to allowed exclusions.
Comment 4 DIV 2025-07-03 13:39:18 UTC
Thanks for the suggestion.  

On the likelihood of "Windows antivirus protection" being the cause  
-------------------------------------------------------------------
I have variously used two different third-party commercial AV software products (currently Bitdefender) for ~10 years on this laptop.  
During that time I have successfully extracted more than 20 different applications to various folders under
"C:\Program Files (portable)"
and have never had any trouble running any of them.  
If some form of "antivirus protection" were the cause, then I don't know why it would only affect LibreOffice and nothing else.  
Note also that there is no notification from the AV software (see also below).  

Are you able to launch the portable version from that same path???

On the suggested remedy
-----------------------
I am not really sure how to proceed with "Try to enable in it run the program, adding it to allowed exclusions."
To be clear, I am moderately familiar with setting up exclusions in the Bitdefender AV product.  However, there is no notification relating to LibreOffice from the AV software:  there was no message displayed at the time, nor was any notification logged.  
It doesn't seem productive to add an exception to an AV feature that was never triggered.  


Please advise.
Comment 5 DIV 2025-07-03 13:43:05 UTC
My suggestions would be as follows.  
* Check whether (or not) anyone else can run the portable version from the specified path.
* Check through LibreOffice's source code for a message box displaying an error message as in attachment 201600 [details] (Comment 1).