openoffice-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schmidt <joe...@j-m-schmidt.de>
Subject reliably determine the location of soffice.exe
Date Sun, 15 Mar 2015 14:51:46 GMT
Hello,

The following code returns the directory where soffice.exe is:

Sub Benutzerverzeichnis()
 aService = CreateUnoService("com.sun.star.util.PathSubstitution") 
 sUserPath = ConvertFromURL(aService.substituteVariables("$(prog)", true))
 InputBox ("Ihr aktuelles OpenOffice.org-Benutzerverzeichnis ist:", "Benutzerverzeichnis",
sUserPath)
End Sub

Unfortunately, this does not always reliable, because under OOo 3.3.0 (Win7 32Bit) I get:

C:\Program Files\OpenOffice.org 3\Basis\program

However, the soffice.exe is here:

C:\Program Files\OpenOffice.org 3\program


How can I reliably determine the location of soffice.exe?



Note:
The above code works imho correctly for AOO 4.1.1 (only tested with a server-installation)
but I need a code that works for OOo 3.2.1 to AOO 4.1.1 (and, if it's possible, all LO-Versions).


Greetings,
Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscribe@openoffice.apache.org
For additional commands, e-mail: api-help@openoffice.apache.org


Mime
View raw message