Using shell() command with UNC pathname

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
stoni
Posts: 1
Joined: Sat Apr 19, 2008 9:36 pm

Using shell() command with UNC pathname

Post by stoni »

Hi,
from a macro I want to execute an external program, stored on the server with the shell() command. But I have to use the UNC notation (\\server\path\program.exe). When I run the macro, I always get the failure: "File could not be found!". Does anybody knows, if it is possible to use UNC notation with the shell() command, and whats the correct syntax? I tryed also the Url notation - without success too... :cry:
With the oShell.execute("\\server\path\program") command it works properly, but I need the functionality to wait until the called programm returns...

I want your kindly helps.
Thanks a lot
stoni
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Using shell() command with UNC pathname

Post by Villeroy »

This is quite specific to the Windows operating system, but OOo is a multi-platform suite. I could not find any references to UNC in the developer's guide. However, the Basic language provides one Windows specific goodie. You may be able to get the system path out of the UNC by calling some Windows dll. See Basic online help on keyword "Declare".
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply