Created attachment 70171 [details] cscript error running: http://api.libreoffice.org/examples/OLE/vbscript/WriterDemo.vbs
Created attachment 70172 [details] vbs error debugging: http://api.libreoffice.org/examples/OLE/vbscript/WriterDemo.vbs
Download: http://api.libreoffice.org/examples/OLE/vbscript/WriterDemo.vbs Save as: C:\test.vbs Run: cscript C:\test.vbs See (attached) error message: LibreOffice 3.6 Unknown option: -Embedding Usage: ... OLE bridge is: OK in 3.6.2.2 BROKEN in 3.6.3.2, 3.6.4.1 thanks, Marco
I've faced exactly the same issue. LibO 3.6.3.2 is a great release but cannot be automated by Automation compatible script languages (VBScript, Ruby, ...).
A Crash is something critical, but not this one To be honest, I have no skills here, but I proceeded similar to Comment 3 with "LibreOffice 3.6.4.1 rc" German UI/ German Locale [Build-ID: a9a0717] on German WIN7 Home Premium (64bit) 0. Launch LibO 1. Download Sample from Comment 3. save as <C:\Users\user\test.vbs> 2. Start DOS window > command line prompt in folder C:\Users\user 3. 'cscript test.vbs' <Enter> New Writer document will be created in running LibO with a first text line "The first line in the newly created text document." (see attachment!) No Error message Is my way completely wrong or do you have any Idea why that works for me, but not for other users? @Marco Borra / chauk.mean: Please create a bug report with complete info due to <http://wiki.documentfoundation.org/BugReport> Is there a possibility to do the test with a server installation? That might help to find out more easy where the bug appeared
Created attachment 70259 [details] My Result with LibO 3.6.4.1
Needinfo due to Comment 5
I can confirm this issue. If no soffice process is running i cannot run libreoffice from Delphi-Pascal. I get the same error as by comment of Marco Borra LibreOffice 3.6 Unknown option: -Embedding Usage: ... I can reproduce this error by open an .odt document on internet explorer: - if activex enable - end all open soffice processes - try to open one odt doc - some time after appears the error message: LibreOffice 3.6 Unknown option: -Embedding Usage: ...
Currently we need one common simple way to reproduce the problem, not lots of more without exact description. Currently this Bug is on Status "Some users have problems and they do not understand why". This should become "We have a clear and simple instruction how everybody can reproduce the problem" So the very simple question is: a) can you reproduce the problem with steps in comment 5? aa) And what might be the reason that in Comment 5 no problem was visible? b) If not, how has the proceeding to be modified to reproduce the problem? @Domingo Without info concerning your experimental setup your results do not help
Hm, I just see: without running LibO proceeding due to comment 5 Starts OOo 2.0.3 to create the document - what ever that might mean.
>A Crash is something critical, but not this one I understand. But in my case, LibreOffice is fully automated via OLE. From this point of view, this issue is critical. But it's OK to leave it as normal as I can downgrade to LibO 3.5.7 (see below). >To be honest, I have no skills here, but I proceeded similar to Comment 3 with "LibreOffice 3.6.4.1 rc" German UI/ German Locale [Build-ID: a9a0717] on German WIN7 Home Premium (64bit) ... I've tried LibreOffice 3.6.4 rc1 (2012.11.17) and I have the same issue. My configuration : Windows XP SP3 French. It's worth noting that LibreOffice 3.5.7 does not have this issue. According to Marco Borra, LibreOffice 3.6.2.2 also works fine but I cannot find the download anymore. What additional information do you need ?
>Hm, I just see: without running LibO proceeding due to comment 5 ... Sorry, I missed the fact that you started LibO in your procedure. So, if step0 is performed (LibO is started), launching the VBscript via the cscript.exe or by just double clicking on the script works. If step0 is not performed (LibO is not started), the issue occurs. It seems that it's now reproducible. Thank you Domingo & Rainer. I hope that this will be fixed for the next release.
@chauk.mean So may be the root is some kind of installation - registry - whatever problem? My suspect is that if I uninstall my OOo 2.0.3 I would run into the problems you see.
@chauk.mean If my suspect is true that would lead debugging to a quite different direction. Unfortunately the commit that causes such a problem can't be found by bibisecting, but I hope "between LibO 3.6.2 and 3.6.3" should not have too many changes in that area.
Created attachment 70316 [details] -embedded error
Created attachment 70317 [details] com.sun.star.ServiceManager error
Sorry i have forgotten to save the comments You can reproduce the error if you don't launch LibO 1. Download Sample from Comment 3. save as <C:\Users\user\test.vbs> 2. Start DOS window > command line prompt in folder C:\Users\user 3. 'cscript test.vbs' <Enter>
As expected I run into the problem shown in attachment " -embedded error" when I uninstall OOo 2.0. So NEW I doubt that the problem is LibO internal because everything works fine if LibO has been started before the script lets. @András: any ideas? Please set Status to ASSIGNED and add yourself to "Assigned To" if you accept this Bug or forward the Bug if it's not your turf.
I've faced the same issue. too I can not Run anymore any automated script via OLE.
Same problem for me with (final) 3.6.4.3 (Win7 64bit)
I identified the commit that caused this bug: http://cgit.freedesktop.org/libreoffice/core/commit/?id=81a441c695f01bb67fcf41120d5843660d7531fc This is how it happens: When this line Set objServiceManager= WScript.CreateObject("com.sun.star.ServiceManager") of the example VBScript is invoked, Windows Scripting looks in the Windows registry, where it finds how to initiate this object: [HKEY_CLASSES_ROOT\CLSID\{82154420-0FBF-11d4-8313-005004526AB4}\LocalServer32] C:\Program Files\LibreOffice 3.6\program\soffice.exe --nodefault --nologo However, when soffice.exe is finally called, its command line looks like: "C:\Program Files\LibreOffice 3.6\program\soffice.exe" --nodefault --nologo -Embedding Some Windows subsystem adds an additional argument "-Embedding". And after 81a441c695f01bb67fcf41120d5843660d7531fc LibreOffice does not silently ignore "-Embedding", but fails with the error message. One possible solution is to add this option to desktop/source/app/cmdlineargs.cxx so that it can be silently ignored again.
Yes. All Windows OS appends -Embedding option Other options are: –RegServer –UnregServer http://www.thrysoee.dk/InsideCOM+/ch13b.htm Marco
*** Bug 57315 has been marked as a duplicate of this bug. ***
Created attachment 71826 [details] OOO VBScript automation demonstration script Confirmed that error dialog giving command line argument help appears and script fails on Win7 with LibreOffice 3.6.4 installed as current version few days ago. Additionally, on Linux Ubuntu running from recent master 4.1, once the --invisible argument is given (i.e. ~/.../libo$ ./install/program/soffice --nologo --invisible), LibreOffice remains invisible on all future runs made (whether or not the LibreOffice process is killed in between). Clearly, these options are saved and applied on future runs so it seems that a toggling cl arg (--visible) is needed as well.
*** Bug 57925 has been marked as a duplicate of this bug. ***
Could not reproduce the 'stuck invisible' problem I reported above, except in the expected case where LibO is already invisible running in the background when subsequent calls appear to have no effect. Found Bug 42470 which describes a similar problem in the Linux world with a Java based script dispatcher adding --nodefault and users expecting --nodefault <==> --invisible. I note here that running LibO 3.6.3 from the command line, the --nodefault argument still produces a splash screen. I believe that there are now three parameters that should make LibO start invisibly ... 1) --nodefault = start in background for Linux scripting through Java bridge 2) -Embedded = start in background for Windows Automation (e.g. CreateObject in vbs/js) 3) --invisible, just like it says. Additionally, --headless starts invisibly but should stay that way, while the scripted LibreOffice app should remain able to become visible through script action when started with --invisible, -Embedded and -nodefault. Upshot: -Embedded and -nodefault are needed for backwards compatibility with the previous recommendations of OOo and LibO on how to start LibreOffice in the background via scripts or other apps.
Aurimas Fišeras committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3616640054f4fc18c6e7307ba17e7d89a0f5ae69 fdo#57203 Unknown option: -Embedding The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Aurimas Fišeras committed a patch related to this issue. It has been pushed to "libreoffice-4-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=abf0ed8400d7787fec906b21de74698936d40e28&h=libreoffice-4-0 fdo#57203 Unknown option: -Embedding It will be available in LibreOffice 4.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Aurimas Fišeras committed a patch related to this issue. It has been pushed to "libreoffice-3-6": http://cgit.freedesktop.org/libreoffice/core/commit/?id=80984766863c12009415e28b7d7e8a9fe9255546&h=libreoffice-3-6 fdo#57203 Unknown option: -Embedding It will be available in LibreOffice 3.6.5. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I can confirm that the bug is fixed in LibreOffice 4.0.0 RC1, Version 4.0.0.1 (Build ID: 527dba6f6e0cfbbc71bd6e7b88a52699bb48799)
Embedding problem shows when using OpenLP (Church presentation software). Prevents configuring Impress with the programme. (OpenLP suggest running LibreOffice v3.5.x.x to solve problem). I run Windows XP, 7 and Linux Mint LMDE.
I can confirm that the bug is also fixed in LibreOffice 3.6.5.2 (Build ID: 5b93205)
Thanks I will await this release of LibreOffice and see what happens. Bill -----Original Message----- From: bugzilla-daemon@freedesktop.org [mailto:bugzilla-daemon@freedesktop.org] Sent: 17 January 2013 14:57 To: bill.brookshaw@blueyonder.co.uk Subject: [Bug 57203] Launching .vbs before LibO causes error "Unknown option: -Embedding" and command line help appears Comment # 32 <https://bugs.freedesktop.org/show_bug.cgi?id=57203#c32> on bug 57203 <https://bugs.freedesktop.org/show_bug.cgi?id=57203> from " href="mailto:aurimas@members.fsf.org">Aurimas Fišeras I can confirm that the bug is also fixed in LibreOffice 3.6.5.2 (Build ID: 5b93205) _____ You are receiving this mail because: * You are on the CC list for the bug.
Fixed in both 4.0.0 and 3.5.6
*** Bug 57328 has been marked as a duplicate of this bug. ***