Lodahl's blog: Windows
Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

13 October 2014

Managing settings (on Windows)

I have written quite a few articles about installation and administration of LibreOffice on Windows. My latest post was an update on the installation parameters (read it here: http://lodahl.blogspot.dk/2014/09/silent-installation-on-windows-again.html ).

This time I will write about a new and very convenient way of managing the user settings on each desktop computer. In earlier versions settings could be manipulated by installing an extension with some XML-files. Nice but not perfect as you had to distribute files to each and every computer. This method is on the other hand independent of operating system so the same extension can be used for both Mac, Linux and Windows computers.

From LibreOffice 4.2 its possible to change settings through the Windows Registry and this can be managed through one or more Group Policies in the Active Directory or similar administration system.

Read more about that here: https://wiki.documentfoundation.org/ReleaseNotes/4.2#Windows_Registry_changes.
 You can find some more detailed examples here: http://ask.libreoffice.org/en/question/29537/42-registry-configuration-backend-not-applying-all-settings/.

In this example I needed to make two small changes:

  1. Set “Warn alien format” to “false” and lock the setting. 
  2. Set “Macro security level” to “High” and lock the settings.
All I needed to do was to create two new keys in the Windows Registry:
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common\Save\Document\WarnAlienFormat]
"Value"="false" 
"Final"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common\Security\Scripting\MacroSecurityLevel]
"Value"="2" 
"Final"=dword:00000001


Export

When you have implemented the new keys on one computer and tested it, you can easily export the new keys.

Select the branch of the registry tree (HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common) and click Files - Export. In the dialogue you should select Selected branch and enter the name "Common" because that is the brach you want to export.

Click Save and you will get a Common.reg-file with the following content:

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common]
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common\Save][HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common\Save\Document][HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common\Save\Document\WarnAlienFormat]
"Value"="false"
"Final"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common\Security]
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common\Security\Scripting]
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common\Security\Scripting\MacroSecurityLevel]
"Value"="2"
"Final"=dword:00000001 
This file can easily be imported on other computers or you can push them to the computers through a new Group Policy to the machines:
You create a new Group Policy object and link it to the OU you have configured for all the relevant users in the domain.
  1. You open it up and edit “User Configuration | Windows Settings | Scripts (Logon/Logoff).
  2. Under the Logon node, you add you settings so that regedit.exe calls your Common.reg file silently (with the /s switch): REGEDIT.EXE Common.reg /s
  3. You click Show Files and drop your Common.reg into SYSVOL. 

Some information about Microsoft Windows Registry:
http://technet.microsoft.com/en-us/library/cc753092.aspx http://blog.thesysadmins.co.uk/group-policy-preferences-1-deploying-registry-settings.html
http://blogs.technet.com/b/askds/archive/2007/08/14/deploying-custom-registry-changes-through-group-policy.aspx

Conclusion

I must say this is a much easier approach than the extension method and it makes the whole setup much more flexible since we don't need to handle extensions on each computer any more. For enterprises I recommend using this method for future maintenance.

29 September 2014

Silent installation on Windows (again)


One of many advantages of open source projects is for sure the eternal transition and evolutionary progress. This keeps people like my self busy just following the changes.

Last week I was asked to help a large organization prepare their LibreOffice install package for Windows and I thought “Cool – that gonna take about half an hour”. -Wrong!

The Windows installation parameters has been changed and as always it takes quite some time to find the documentation. You can find some documentation here: https://wiki.documentfoundation.org/Deployment_and_Migration But have ind mind that parameters has changed over time so you can't trust all of it.

The idea of installing all modules ( ADDLOCAL=ALL) and the remove individual modules ( REMOVE=gm_r_ex_Dictionary_Fr, ….) is still valid. But choosing language for the GUI is a little easier than before (UI_LANGS=en_US,da). Earlier you had to add all the language codes to the string and then choose your choice for each (… IS1030=1 IS1031=0 …).

Below is an example that installs LibreOffice in Danish and US English with some but not all dictionaries:

msiexec /qn /i C:\[path_to_install]\LibreOffice_4.3.2.2_Win_x86.msi /l* C:\[path_to_logs]\libreoffice_install_log.txt UI_LANGS=en_US,da CREATEDESKTOPLINK=1 ALLUSERS=1 RebootYesNo=No ADDLOCAL=ALL ISCHECKFORPRODUCTUPDATES=0 QUICKSTART=0 REMOVE=gm_r_ex_Dictionary_Fr,gm_r_ex_Dictionary_Es,gm_r_ex_Dictionary_Sr,gm_r_ex_Dictionary_Pt_Br,gm_r_ex_Dictionary_It,gm_r_ex_Dictionary_Af,gm_r_ex_Dictionary_An,gm_r_ex_Dictionary_Ar,gm_r_ex_Dictionary_Be,gm_r_ex_Dictionary_Bg,gm_r_ex_Dictionary_Bn,gm_r_ex_Dictionary_Br,gm_r_ex_Dictionary_Bs,gm_r_ex_Dictionary_Pt_Pt,gm_r_ex_Dictionary_Ca,gm_r_ex_Dictionary_Cs,gm_r_ex_Dictionary_De,gm_r_ex_Dictionary_Nl,gm_r_ex_Dictionary_Et,gm_r_ex_Dictionary_Gd,gm_r_ex_Dictionary_Gl,gm_r_ex_Dictionary_Gu,gm_r_ex_Dictionary_He,gm_r_ex_Dictionary_Hi,gm_r_ex_Dictionary_Hu,gm_r_ex_Dictionary_Ru,gm_r_ex_Dictionary_Lt,gm_r_ex_Dictionary_Lv,gm_r_ex_Dictionary_Ne,gm_r_ex_Dictionary_No,gm_r_ex_Dictionary_Is,gm_r_ex_Dictionary_Oc,gm_r_ex_Dictionary_Pl,gm_r_ex_Dictionary_Ro,gm_r_ex_Dictionary_Si,gm_r_ex_Dictionary_Lo,gm_r_ex_Dictionary_Sk,gm_r_ex_Dictionary_Sl,gm_r_ex_Dictionary_El,gm_r_ex_Dictionary_Hr,gm_r_ex_Dictionary_Sv,gm_r_ex_Dictionary_Te,gm_r_ex_Dictionary_Th,gm_r_ex_Dictionary_Uk,gm_r_ex_Dictionary_Vi,gm_r_ex_Dictionary_Zu

Some other things that has been improved dramatically is the new way of handling settings. In earlier versions settings could be manipulated by installing an extension with some XML-files. Nice but not perfect as you had to distribute files to each and every computer. 

From LibreOffice 4.2 its possible to change settings through the Windows Registry and this can be managed through one or more Group Policies in the Active Directory or similar adminsitration system.


I needed to make two small changes:
  1. Set “Warn alien format” to “false” and lock the setting.
  2. Set “Macro security level” to “High” and lock the settings
All I needed to do was to create two new keys in the Windows Registry and push this through a new Group Policy to the machines:

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common\Save\Document\WarnAlienFormat]
"Value"="false" 
"Final"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common\Security\Scripting\MacroSecurityLevel]
"Value"="2" 
"Final"=dword:00000001

I must say this is a much easier approach than the extension method and it makes the whole setup much more flexible since we don't need to handle extensions on each computer anymore.

13 December 2012

MSIEXEC parameters

Some time ago I wrote a few articles about administrative installation of LibreOffice on Windows. I have had quite a lot of feedback. Later there has come a wiki page on The Document Foundation wiki: Its called Deployment and Migration.

Nice but its still rather cumbersome to actually create a parameter string that works.

I have created a MSIEXEC parameter generator in a very simple spreadsheet. You can fill in the questionnaire and with a single click you get the complete string of parameters. There is not much error handling and evaluation so you can actually generate strings that doesn't work when you try to run it. But that might come later if any interest?

You can find the template with the macro on the extension website: http://templates.libreoffice.org/template-center/libreoffice-msi-generator . The template is waiting for approval currently, but I expect it to be approved shortly. Until the template gets approved you can get it from Dropbox here: http://dl.dropbox.com/u/9348527/LibreOffice_MSI.ots.

14 March 2009

One product that I dont want!

Microsoft is suffering during the financial crisis. Of cause. Who isn't. But now Microsoft is again looking around for new markets to take over. I honestly thought it was a joke when I first saw that Microsoft is working on software for cars.

I will turn in my drivers license if that happens.

Just think about what will happen if you press the “Close Windows” button? Will it close the cars windows or will it close....Windows?

Imagine that you are going to see your mothers house in the weekend. On the way, you need to make a left turn.

“Your 30 trial version of 'Left Turn' has expired. Would you like to buy 'Left Turn' now?”

YES YES YES give me 'Left Turn' software NOW.

“Downloading....”. “Please read the EULA carefully. Do you accept the terms and conditions?”

YES!

“This application consist of third party software. Please accept these third party terms and conditions. Do you accept the third party EULA?”

YES.

“Windows needs to be restarted after install of new software. Will restart in 15 14 21 4.3.2.1. Please wait while Windows is restarting....”

“The installed driver is corrupt. Please replace driver. “

“Please wait while Windows is restarting....”

“Doing consistency check on drive c:. Please wait 1%”

“Starting Windows”

"Restarting Windows"

Okay. Now you are on the way, but on the highway, you can see one truck ahead driving very slow so you want to reduce speed. You know; just in case.

“The application 'Brakes 2.03' is not compatible with your audio software. Would you like to search for compatible software?”

NO you don't have the time. You are trying to avoid an accident and you try to pass the truck without hiding it. You don't make it and crashes right into the truck.

Remember a 'crash' in the real world is a CRASH. Metal towards metal...terrible sound when that happens. I'm very happy that you have that wonderful airbag installed in your car. When you wake up again, you will see this message on the screen:

”Airbag ejection activated. Are you sure?”

If you see a guy on the highway on a bike – that me and it's running Linux!