<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Lev Shuvalov&#160; &#187; windows</title>
	<atom:link href="http://shuvalov.com/category/windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://shuvalov.com</link>
	<description>system administrator</description>
	<lastBuildDate>Mon, 10 Oct 2011 17:31:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>error ca400res.dll</title>
		<link>http://shuvalov.com/error-ca400resdll/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=error-ca400resdll</link>
		<comments>http://shuvalov.com/error-ca400resdll/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 09:30:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[windows]]></category>
		<category><![CDATA[as/400]]></category>
		<category><![CDATA[ibis]]></category>
		<category><![CDATA[ibm]]></category>

		<guid isPermaLink="false">http://administrator-system.com/system-administrator/?p=162</guid>
		<description><![CDATA[ca400res.dll is a ca400cpl.cpl belongs to IBM AS/400 Client Access Express for Windows and located in %windir%\system32\ca400cpl.cpl (e.g. c:\windows\system32\ca400cpl.cpl) To fix that error 1. delete c:\windows\system32\ca400cpl.cpl 2. re-install IBM AS/400 Client Access Express for Windows]]></description>
			<content:encoded><![CDATA[<p>ca400res.dll is a ca400cpl.cpl belongs to IBM AS/400 Client Access Express for Windows and located in %windir%\system32\ca400cpl.cpl (e.g. c:\windows\system32\ca400cpl.cpl)</p>
<p>To fix that error<br />
<a href="http://localhost/system_administrator/wp-content/uploads/2008/12/ca400res_dll_error.png"><img class="alignnone size-full wp-image-102" title="ca400res.dll error message" src="http://localhost/system_administrator/wp-content/uploads/2008/12/ca400res_dll_error.png" alt="" width="215" height="100" /></a></p>
<p>1. delete c:\windows\system32\ca400cpl.cpl</p>
<p>2. re-install IBM AS/400 Client Access Express for Windows</p>
]]></content:encoded>
			<wfw:commentRss>http://shuvalov.com/error-ca400resdll/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>convert .html, .doc, .rtf etc to .sxw and .pdf through OpenOffice in command line</title>
		<link>http://shuvalov.com/convert-html-doc-rtf-etc-to-sxw-and-pdf-through-openoffice-in-command-line/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=convert-html-doc-rtf-etc-to-sxw-and-pdf-through-openoffice-in-command-line</link>
		<comments>http://shuvalov.com/convert-html-doc-rtf-etc-to-sxw-and-pdf-through-openoffice-in-command-line/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 16:02:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[basic]]></category>
		<category><![CDATA[doc]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[ooo]]></category>
		<category><![CDATA[pdf]]></category>

		<guid isPermaLink="false">http://administrator-system.com/system-administrator/?p=101</guid>
		<description><![CDATA[convert .html, .doc, .rtf etc to .sxw and .pdf through OpenOffice in command line I have got a task to convert files form MS Word, RTF, HTML formats to SXW ( OpenOffice 1.0 Text Document ) and PDF formats in command line. I have found a solution on forum http://www.oooforum.org/ and it was nontrivial to [...]]]></description>
			<content:encoded><![CDATA[<p>convert .html, .doc, .rtf etc to .sxw and .pdf through OpenOffice in command line</p>
<p>I have got a task to convert files form MS Word, RTF, HTML formats to SXW ( OpenOffice 1.0 Text Document ) and PDF formats in command line. </p>
<p>I have found a solution on forum  <a href="http://www.oooforum.org/">http://www.oooforum.org/</a> and it was nontrivial to me. Needs to write StarBasic module and execute  <a href="http://www.openoffice.org/">OpenOffice</a> in invisible mode by DOS batch file or BASH script.</p>
<pre>
"soffice" -invisible "macro:///MyLibrary.MyModule.MyFunction(/fullpath/filename.ext)"
</pre>
<p>If you have a different type of transformation you can to change my or write your own function with a different filter.  In code of its you have to use a internal name of choosen filter according to <a href="http://shuvalov.com/storage/book/openoffice/filter_description.html">that list </a>.  Certainly, that filter should be available for Import or Export depends on what you are going to do to read or to save. If you will not define some filter then <a href="http://www.openoffice.org/">OpenOffice</a> will read or save in a default format.</p>
<p>Steps:</p>
<p>1. Execute <a href="http://www.openoffice.org/">OpenOffice</a></p>
<pre>
$ soffice
</pre>
<p>2. Create a library.</p>
<pre>
Under <a href="http://www.openoffice.org/">OpenOffice</a> 1.1.x in main menu Tools | Marcos | Macro...
  Then press the button  "Organizer...".
  Choose the tab  "Libraries".
  Click on the library name.
  And press the button "New..."

Under <a href="http://www.openoffice.org/">OpenOffice</a> 1.9.x in main menu Tools | Marcos | Organize Macros | OpenOffice.org...
  Then press the button  "Organizer...".
  Choose the tab  "Libraries".
  Press the button "New..." 

Name the library. In my case it is "LevShuvalov".
</pre>
<p>3. Create a module in just created library</p>
<pre>
You still in the "Macro Organizer" pop-up window.
Choose the tab "Modules".
Press the button "New Module..." for <a href="http://www.openoffice.org/">OpenOffice</a> 1.1.x and "New..." for <a href="http://www.openoffice.org/">OpenOffice</a> 1.9.x.

Name the module. In my case it is "Convert". And press the button "Edit"
</pre>
<p>4. Download <a href="http://shuvalov.com/storage/LevShuvalov/openoffice/LevShuvalov_Convert.bas">a recent versoin of the module</a>. Or copy-paste the code below, but in this case be careful with line feeds.</p>
<pre>
REM  *****  BASIC  *****
'
' This module for command line conversion HTML, DOC, RTF etc to SXW and PDF through OpenOffice.
'
' Code is based on answers, examplas and functions by Danny Brewer (God bless him) on:
' http://www.oooforum.org/forum/viewtopic.phtml?
' t=3772&#038;start=0&#038;postdays=0&#038;postorder=asc&#038;highlight=object+variable+set+storetourl
' list of filters internal names from:
' http://framework.openoffice.org/files/documents/25/897/filter_description.html

'****************************************************************************
' Copyright (c) 2003 Danny Brewer, 2005 Lev Shuvalov
'
' Anyone may run this code.
' If you wish to modify or distribute this code, then
' you are granted a license to do so under the terms
' of the Gnu Lesser General Public License.
' See:  http://www.gnu.org/licenses/lgpl.html
'****************************************************************************
'
' 2005-05-25 tested OpenOffice 1.1.4 and 1.9.104
' 2005-05-25 replace Left(cFile, Len(cFile) - 4) + ".ext" to   cutExtension( cFile ) + ".ext"
' 2005-05-25 add function cutExtension. Filename could be without extension,
'                     also extension could be longer or shorter than 3 characters
' 2005-05-24 tested on OpenOffice 1.1.1 and 1.9.95
' 2005-05-24 initial

Sub HTMLtoSXW( cFile )
  If Not FileExists ( cFile ) Then exit Sub
  oDoc = StarDesktop.loadComponentFromURL( ConvertToURL( cFile ), "_blank", 0,_
   Array( MakePropertyValue( "Hidden", true), MakePropertyValue( "FilterName", "HTML (StarWriter)")))
  ' Save the document using no filter.  Thus saves a native Writer document.
  oDoc.storeToURL( ConvertToURL( cutExtension( cFile ) + ".sxw" ) , Array() )
  oDoc.close( True )
End Sub

' need for OpenOffice 1.1.1, under 1.9.x possible to use AsPDF
Sub HTMLtoPDF( cFile )
  If Not FileExists ( cFile ) Then exit Sub
  oDoc = StarDesktop.loadComponentFromURL( ConvertToURL( cFile ), "_blank", 0,_
   Array( MakePropertyValue( "Hidden", true), MakePropertyValue( "FilterName", "HTML (StarWriter)")))
  oDoc.storeToURL( ConvertToURL( cutExtension( cFile ) + ".pdf" ),_
   Array(MakePropertyValue( "FilterName", "writer_pdf_Export" )) )
  oDoc.close( True )
End Sub

Sub AsSXW( cFile )
  If Not FileExists ( cFile ) Then exit Sub
  oDoc = StarDesktop.loadComponentFromURL( ConvertToURL( cFile ) , "_blank", 0,_
   Array( MakePropertyValue( "Hidden", true) ) )
  ' Save the document using no filter.  Thus saves a native Writer document.
  oDoc.storeToURL( ConvertToURL(  cutExtension( cFile ) + ".sxw" ), Array() )
  oDoc.close( True )
End Sub

Sub AsPDF(cFile)
  If Not FileExists ( cFile ) Then exit Sub

  Dim strFilterSubName as String
  oDoc = StarDesktop.loadComponentFromURL( ConvertToURL( cFile ), "_blank", 0,_
   array(MakePropertyValue("Hidden", true)) )
  If not IsNull(oDoc) Then
    strFilterSubName = ""
    ' select appropriate filter
    If oDoc.SupportsService("com.sun.star.presentation.PresentationDocument") Then
      strFilterSubName = "impress_pdf_Export"
    ElseIf oDoc.SupportsService("com.sun.star.sheet.SpreadsheetDocument") Then
      strFilterSubName = "calc_pdf_Export"
    ElseIf oDoc.SupportsService("com.sun.star.text.WebDocument") Then
      strFilterSubName = "writer_web_pdf_Export"
    ElseIf oDoc.SupportsService("com.sun.star.text.GlobalDocument") Then
      strFilterSubName = "writer_globaldocument_pdf_Export"
    ElseIf oDoc.SupportsService("com.sun.star.text.TextDocument") Then
      strFilterSubName = "writer_pdf_Export"
    ElseIf oDoc.SupportsService("com.sun.star.drawing.DrawingDocument") Then
      strFilterSubName = "draw_pdf_Export"
    ElseIf oDoc.SupportsService("com.sun.star.formula.FormulaProperties") Then
      strFilterSubName = "math_pdf_Export"
    ElseIf oDoc.SupportsService("com.sun.star.chart.ChartDocument") Then
      strFilterSubName = "chart_pdf_Export"
    Else
    '
    EndIf
  EndIf 

  If Len(strFilterSubName) > 0 Then
    oDoc.storeToURL( ConvertToURL( cutExtension( cFile ) + ".pdf" ),_
     Array(MakePropertyValue( "FilterName", strFilterSubName )) )
  EndIf
  oDoc.close(True)
End Sub

Function MakePropertyValue( Optional cName As String, Optional uValue )_
 As com.sun.star.beans.PropertyValue
  Dim oPropertyValue As New com.sun.star.beans.PropertyValue
  If Not IsMissing( cName ) Then
    oPropertyValue.Name = cName
  EndIf
  If Not IsMissing( uValue ) Then
    oPropertyValue.Value = uValue
  EndIf
  MakePropertyValue() = oPropertyValue
End Function

' cut last piece of filename which beginning with "."
Function cutExtension ( cFile )
  splitFilename = Split ( cFile, "." )
  uboundArray = UBound( splitFilename )
  If uboundArray > 0 Then '-------- filename has a part with dot
    ' assemble filename back without last part
    For index=0 to uboundArray - 1
      saveFilename = saveFilename + splitFilename(index) + "."
    Next index
    ' cut last "."
    cutExtension = Left( saveFilename, Len( saveFilename ) - 1 )
  Else '--------------------------- filename has not a part with dot
    cutExtension = cFile
  Endif
End Function
</pre>
<p>5. Save and compile the module.</p>
<p>6. Download a recent versoin of <a href="http://shuvalov.com/storage/LevShuvalov/openoffice/OOo_convert.bat">DOS batch file</a> or/and <a href="http://shuvalov.com/storage/LevShuvalov/openoffice/OOo_convert.sh">BASH script</a>. Or copy-paste text below:</p>
<pre>
@echo off
rem
rem  Run command line conversion HTML, DOC, RTF etc to SXW and PDF through OpenOffice.
rem
rem  2005-05-26  revision

set OfficeDir=C:Program FilesOpenOffice.org 1.9.104program
rem set OfficeDir=C:Program FilesOpenOffice.org1.1.1program

if "%1"=="" (
  echo:
  echo  Cannot find what file[s] need to convert
  echo:
  echo  usage:   OOo_convert.bat full_path_to_exact_file_or_wildcard
  echo  example:
  echo           OOo_convert.bat C:tmpconverttest.doc
  echo           OOo_convert.bat C:tmpconvert*.htm
  echo:
  exit
)

echo Converting...
  for %%c in ("%1") DO (
    echo %%c

    "%OfficeDir%soffice" -invisible "macro:///LevShuvalov.Convert.HTMLtoSXW(%%c)"
    rem "%OfficeDir%soffice" -invisible "macro:///LevShuvalov.Convert.HTMLtoPDF(%%c)"
    rem "%OfficeDir%soffice" -invisible "macro:///LevShuvalov.Convert.AsSXW(%%c)"
    rem "%OfficeDir%soffice" -invisible "macro:///LevShuvalov.Convert.AsPDF(%%c)"
  )
echo Done.
exit
</pre>
<p>or</p>
<pre>
#!/bin/bash
#
#  Run command line conversion HTML, DOC, RTF etc to SXW and PDF through OpenOffice.
#
#  2005-05-27  revision

OfficeDir="/home/users/lev/oo14"

if [ "$#" -lt "1" ]; then
  echo
  echo  "Cannot find what file(s) need to convert"
  echo
  echo  "usage:   OOo_convert.sh full_path_to_exact_file_or_wildcard"
  echo  "example:"
  echo  "         OOo_convert.sh /tmp/convert/test.doc"
  echo  "         OOo_convert.sh /tmp/convert/*htm"
  echo
  exit 1
fi

echo Converting...
  for file in "$@"
  do
    echo "$file"

    "$OfficeDir/soffice" -invisible "macro:///LevShuvalov.Convert.HTMLtoSXW($file)"
    #"$OfficeDir/soffice" -invisible "macro:///LevShuvalov.Convert.HTMLtoPDF($file)"
    #"$OfficeDir/soffice" -invisible "macro:///LevShuvalov.Convert.AsSXW($file)"
    #"$OfficeDir/soffice" -invisible "macro:///LevShuvalov.Convert.AsPDF($file)"
  done
echo Done.
exit 0
</pre>
<p>7. Under linux change permissions for OOo_convert.sh.</p>
<pre>
$chmod 750 OOo_convert.sh
</pre>
<p>8. Change the variable OfficeDir  and choose function for conversion then  you can run script. <b>Do not forget</b> to give a full path to a temporary directory / folder for conversion or to a exact file.</p>
<pre>
>OOo_convert.bat C:tmpconverttest.doc
</pre>
<p>or</p>
<pre>
$OOo_convert.sh /tmp/convert/test.doc
</pre>
<p>If you for some reason you remove line of code <code>If Not FileExists ( cFile ) Then exit Sub</code> and give an incorrect file name for conversion also if you give a relative path to a temporary directory or to a exact file. You will get error message under <a href="http://www.openoffice.org/">OpenOffice</a> 1.1.x  &#8220;<b>Object variable not set</b>&#8221; and under <a href="http://www.openoffice.org/">OpenOffice</a> 1.9.x &#8220;<b>URL seems to be unsupported one</b>&#8221;</p>
<p>If a chosen filter is incorrect for current file format you also will get &#8220;<b>URL seems to be unsupported one</b>&#8220;.</p>
<p>Many thanks to <b>Danny Brewer</b> who actually made these functions, I just collect them. <img src='http://shuvalov.com/system-administrator/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://shuvalov.com/convert-html-doc-rtf-etc-to-sxw-and-pdf-through-openoffice-in-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>if complexity is enable (gpedit.msc)</title>
		<link>http://shuvalov.com/if-complexity-is-enable-gpeditmsc/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=if-complexity-is-enable-gpeditmsc</link>
		<comments>http://shuvalov.com/if-complexity-is-enable-gpeditmsc/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 06:26:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[2000]]></category>
		<category><![CDATA[2003]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[XP]]></category>

		<guid isPermaLink="false">http://administrator-system.com/system-administrator/?p=158</guid>
		<description><![CDATA[if complexity is enable (gpedit.msc) Passwords cannot contain the user&#8217;s account name or parts of the user&#8217;s full name that exceed two consecutive characters. Passwords must be at least seven characters in length. Passwords must contain characters from three of the following four categories: English uppercase characters (A through Z); English lowercase characters (a through [...]]]></description>
			<content:encoded><![CDATA[<p>if complexity is enable (gpedit.msc)</p>
<ul>
<li>Passwords cannot contain the user&#8217;s account name or parts of the user&#8217;s full name that exceed two consecutive characters.</li>
<li>Passwords must be at least seven characters in length.</li>
<li>Passwords must contain characters from three of the following four categories:
<ol>
<li>English uppercase characters (A through Z);</li>
<li>English lowercase characters (a through z);</li>
<li>Base 10 digits (0 through 9);</li>
<li>Non-alphabetic characters (for example, !, $, #, %).</li>
</ol>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://shuvalov.com/if-complexity-is-enable-gpeditmsc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>set sntp server</title>
		<link>http://shuvalov.com/set-sntp-server/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=set-sntp-server</link>
		<comments>http://shuvalov.com/set-sntp-server/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 05:52:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[sntp]]></category>

		<guid isPermaLink="false">http://administrator-system.com/system-administrator/?p=160</guid>
		<description><![CDATA[stop service Windows Time net time /setsntp:192.001.001.001 start service Windows Time where 192.001.001.001 &#8211; an example IP of a SNTP server]]></description>
			<content:encoded><![CDATA[<pre>stop service Windows Time
net time /setsntp:192.001.001.001
start service Windows Time</pre>
<p>where 192.001.001.001 &#8211; an example IP of a SNTP server</p>
]]></content:encoded>
			<wfw:commentRss>http://shuvalov.com/set-sntp-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>537 &#8211; wrong IP for default gateway</title>
		<link>http://shuvalov.com/537-wrong-ip-for-default-gateway/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=537-wrong-ip-for-default-gateway</link>
		<comments>http://shuvalov.com/537-wrong-ip-for-default-gateway/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 15:43:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[event]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://administrator-system.com/system-administrator/?p=93</guid>
		<description><![CDATA[Wrong IP in default gateway on host 192.XXX.XXX.XXX Event Type: Failure Audit Event Source: Security Event Category: Logon/Logoff Event ID: 537 Date: 3/5/2009 Time: 11:13:51 AM User: NT AUTHORITY\SYSTEM Computer: XXXXXXXX Description: Logon Failure: Reason: An error occurred during logon User Name: Domain: Logon Type: 3 Logon Process: Kerberos Authentication Package: Kerberos Workstation Name: - [...]]]></description>
			<content:encoded><![CDATA[<p>Wrong IP in default gateway on host 192.XXX.XXX.XXX</p>
<hr />
Event Type:	Failure Audit<br />
Event Source:	Security<br />
Event Category:	Logon/Logoff<br />
Event ID:	537<br />
Date:		3/5/2009<br />
Time:		11:13:51 AM<br />
User:		NT AUTHORITY\SYSTEM<br />
Computer:	XXXXXXXX<br />
Description:<br />
Logon Failure:<br />
Reason:		An error occurred during logon<br />
User Name:<br />
Domain:<br />
Logon Type:	3<br />
Logon Process:	Kerberos<br />
Authentication Package:	Kerberos<br />
Workstation Name:	-<br />
Status code:	0xC000006D<br />
Substatus code:	0xC0000133<br />
Caller User Name:	-<br />
Caller Domain:	-<br />
Caller Logon ID:	-<br />
Caller Process ID:	-<br />
Transited Services:	-<br />
Source Network Address:	192.XXX.XXX.XXX<br />
Source Port:	1343</p>
]]></content:encoded>
			<wfw:commentRss>http://shuvalov.com/537-wrong-ip-for-default-gateway/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>remove MSN Windows Messenger</title>
		<link>http://shuvalov.com/remove-ms-windows-messenger/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=remove-ms-windows-messenger</link>
		<comments>http://shuvalov.com/remove-ms-windows-messenger/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 12:45:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[messenger]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[remove]]></category>
		<category><![CDATA[service pack 2]]></category>
		<category><![CDATA[XP]]></category>

		<guid isPermaLink="false">http://administrator-system.com/system-administrator/?p=87</guid>
		<description><![CDATA[Start &#124; Run rundll32.exe advpack.dll,LaunchINFSection %windir%\inf\msmsgs.inf,BLC.Remove rundll32.exe setupapi,InstallHinfSection BLC.Remove 128 %systemRoot%\INF\msmsgs.inf]]></description>
			<content:encoded><![CDATA[<p>Start | Run </p>
<pre>
rundll32.exe advpack.dll,LaunchINFSection %windir%\inf\msmsgs.inf,BLC.Remove
rundll32.exe setupapi,InstallHinfSection BLC.Remove 128 %systemRoot%\INF\msmsgs.inf
</pre>
]]></content:encoded>
			<wfw:commentRss>http://shuvalov.com/remove-ms-windows-messenger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

