<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Running soffice.exe with a relative path from Command Prompt doesn't work"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=124776">124776</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Running soffice.exe with a relative path from Command Prompt doesn't work
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>tml@iki.fi
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:
Try to run soffice.exe from Command Prompt (this is specific to Windows,
obviously) using instdir\program\soffice.exe. The soffice.exe and soffice.bin
processes run for a short while but exit then without doing anything.

Using an absolute pathname C:\where\ever\instdir\program\soffice.exe works.

Not sure how long this has been broken. But surely the intent is that using
just instdir\program\soffice.exe should work? (Like it does when run from a
Cygwin shell in mintty, and on Linux.)

The problem seems to be that getIniFileName_Impl() in sal/rtl/bootstrap.cxx
does not return a file: URL but a relative pathname, huh.

And that is because osl_getExecutableFile() does not return an absolute
filename, but what happens to be in argv[0]. Surely we should use some other
way to find out the executable's pathname and not rely on what happens to be in
argv[0] (Also, sal_detail_initialize() takes a plain char argv, not a wchar_t
one, and thus is fairly broken already when LibreOffice is installed in a
pathname that isn't expressible in the system codepage. We should use
GetModulePathNameW(NULL,...).

Steps to Reproduce:
.

Actual Results:
.

Expected Results:
.


Reproducible: Always


User Profile Reset: No



Additional Info:
.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>