[Solved] C# API How to start OOo without Registration Wizard
[Solved] C# API How to start OOo without Registration Wizard
hi,
How can I Bootstrap the OOo without Registration Wizard by c# by API?
or how can I Know the Registraton Wizard process was closed when I Bootstrap the OOo?
for example :
The first time the OpenOffice.org be started,
when my main Process bootstrap the OOo: "XComponentContext oStrap = uno.util.Bootstrap.bootstrap();",
the "Registration Wizard" will be opened, then "cancel" or "close" the "Registration Wizard",
though the "Registration Wizard" process be disposed, the main process will still wait for it.
How can I Bootstrap the OOo without Registration Wizard by c# by API?
or how can I Know the Registraton Wizard process was closed when I Bootstrap the OOo?
for example :
The first time the OpenOffice.org be started,
when my main Process bootstrap the OOo: "XComponentContext oStrap = uno.util.Bootstrap.bootstrap();",
the "Registration Wizard" will be opened, then "cancel" or "close" the "Registration Wizard",
though the "Registration Wizard" process be disposed, the main process will still wait for it.
Last edited by sinxxx on Wed Oct 20, 2010 1:01 pm, edited 1 time in total.
openoffice 3.2 for windows
Re: [C# API] How to start OOo without Registration Wizard
when you install over OOo , you change not registration ...once ....it dos not show ..up
OpenOffice 3.1
Re: [C# API] How to start OOo without Registration Wizard
Have you checked the Administration at http://wiki.services.openoffice.org/wik ... tion_Guide ? On the right hand is a list of chapters. The sixth item on the list cover you request.sinxxx wrote:hi,
How can I Bootstrap the OOo without Registration Wizard by c# by API?
or how can I Know the Registraton Wizard process was closed when I Bootstrap the OOo?
for example :
The first time the OpenOffice.org be started,
when my main Process bootstrap the OOo: "XComponentContext oStrap = uno.util.Bootstrap.bootstrap();",
the "Registration Wizard" will be opened, then "cancel" or "close" the "Registration Wizard",
though the "Registration Wizard" process be disposed, the main process will still wait for it.
HTH
OpenOffice.org v3.3, LibO v3.32 on Ubuntu 10.10 and Win7
Re: [C# API] How to start OOo without Registration Wizard
hi,
well I mean that to start OOo without Registration Wizard by API.
such as
well I mean that to start OOo without Registration Wizard by API.
such as
Code: Select all
uno.util.Bootstrap.bootstrap();
openoffice 3.2 for windows
Re: [C# API] How to start OOo without Registration Wizard
As far as I know, you must at least run once through the First Start Wizard. Only way to get around it is to use the parameter -nofirststartwizard for starting OOo. Although I have no idea how to use that parameter from C#.sinxxx wrote:hi,
well I mean that to start OOo without Registration Wizard by API.
such asCode: Select all
uno.util.Bootstrap.bootstrap();
OOo 3.2.0 on Ubuntu 10.04 • OOo 3.2.1 on Windows 7 64-bit and MS Windows XP
Re: [C# API] How to start OOo without Registration Wizard
Did I you look at the link? There is a section on how to bypass the Reg Wizard.sinxxx wrote:hi,
well I mean that to start OOo without Registration Wizard by API.
such asCode: Select all
uno.util.Bootstrap.bootstrap();
OpenOffice.org v3.3, LibO v3.32 on Ubuntu 10.10 and Win7
Re: [C# API] How to start OOo without Registration Wizard
hi,therabi wrote:Did I you look at the link? There is a section on how to bypass the Reg Wizard.sinxxx wrote:hi,
well I mean that to start OOo without Registration Wizard by API.
such asCode: Select all
uno.util.Bootstrap.bootstrap();
what this link told is using the .oxt file to deactivating the RegWizard,
but I dont not have any Roles to patch this .oxt file to SB's OS.
openoffice 3.2 for windows
Re: [C# API] How to start OOo without Registration Wizard
An example:
Code: Select all
unoidl.com.sun.star.uno.XComponentContext xContext = null;
Microsoft.Win32.RegistryKey regkey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(
@"SOFTWARE\OpenOffice.org\UNO\InstallPath", false);
if (regkey == null)
return;
string installPath = (string)regkey.GetValue("");
if (installPath == null)
return;
string officePath = installPath + @"\soffice.exe";
string officeParams = " -nodefault -nologo -nofirststartwizard";
string unoParams = " -accept=pipe,name=officepipe1;urp;StarOffice.ServiceManager";
System.Environment.SetEnvironmentVariable(
"URE_BOOTSTRAP", "vnd.sun.star.pathname:" + installPath + "/fundamental.ini");
System.Diagnostics.Process p = System.Diagnostics.Process.Start(officePath, officeParams + unoParams);
XComponentContext xLocalContext = uno.util.Bootstrap.defaultBootstrap_InitialComponentContext();
XMultiComponentFactory xLocalServiceManager = xLocalContext.getServiceManager();
XUnoUrlResolver xUrlResolver = (XUnoUrlResolver) xLocalServiceManager.createInstanceWithContext(
"com.sun.star.bridge.UnoUrlResolver", xLocalContext);
int i = 0;
while (i < 20) {
try
{
xContext = (XComponentContext)xUrlResolver.resolve(
"uno:pipe,name=officepipe1;urp;StarOffice.ComponentContext");
if (xContext != null)
break;
} catch (unoidl.com.sun.star.connection.NoConnectException) {
System.Threading.Thread.Sleep(100);
}
i++;
}
if (xContext == null)
return;
XMultiServiceFactory xMsf = (XMultiServiceFactory) xContext.getServiceManager();
Object desktop = xMsf.createInstance("com.sun.star.frame.Desktop");
XComponentLoader xLoader = (XComponentLoader)desktop;
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
Apache OpenOffice 4-dev on Xubuntu 14.04
Re: [C# API] How to start OOo without Registration Wizard
hi,hanya wrote:An example:Code: Select all
unoidl.com.sun.star.uno.XComponentContext xContext = null; Microsoft.Win32.RegistryKey regkey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey( @"SOFTWARE\OpenOffice.org\UNO\InstallPath", false); if (regkey == null) return; string installPath = (string)regkey.GetValue(""); if (installPath == null) return; string officePath = installPath + @"\soffice.exe"; string officeParams = " -nodefault -nologo -nofirststartwizard"; string unoParams = " -accept=pipe,name=officepipe1;urp;StarOffice.ServiceManager"; System.Environment.SetEnvironmentVariable( "URE_BOOTSTRAP", "vnd.sun.star.pathname:" + installPath + "/fundamental.ini"); System.Diagnostics.Process p = System.Diagnostics.Process.Start(officePath, officeParams + unoParams); XComponentContext xLocalContext = uno.util.Bootstrap.defaultBootstrap_InitialComponentContext(); XMultiComponentFactory xLocalServiceManager = xLocalContext.getServiceManager(); XUnoUrlResolver xUrlResolver = (XUnoUrlResolver) xLocalServiceManager.createInstanceWithContext( "com.sun.star.bridge.UnoUrlResolver", xLocalContext); int i = 0; while (i < 20) { try { xContext = (XComponentContext)xUrlResolver.resolve( "uno:pipe,name=officepipe1;urp;StarOffice.ComponentContext"); if (xContext != null) break; } catch (unoidl.com.sun.star.connection.NoConnectException) { System.Threading.Thread.Sleep(100); } i++; } if (xContext == null) return; XMultiServiceFactory xMsf = (XMultiServiceFactory) xContext.getServiceManager(); Object desktop = xMsf.createInstance("com.sun.star.frame.Desktop"); XComponentLoader xLoader = (XComponentLoader)desktop;
it works well for me,
thanks.
openoffice 3.2 for windows