If you find this project useful, please give it a star! Your support is appreciated and helps keep the project growing. ?
This PowerShell script automates the process of downloading and installing LibreOffice on Windows machines. It ensures that the script is run with administrator privileges, downloads the LibreOffice installer from the official mirror, and installs it to the specified directory.
Click the link to read Instructions ?.
PowerShell 5.1 or higher
Windows 7 or higher
Internet connection required to download the installer
You need to have PowerShell installed on your system to run the script.
Select the version that matches your system specs:
For Windows 64-bit systems: Download 64-Bit Installer
For Windows 32-bit systems: Download 32-Bit Installer
This PowerShell script downloads and installs LibreOffice, with robust error handling and logging functionalities.
The script includes a logging function that logs messages to both the console and a log file, which helps in tracking progress and errors during execution.
All log messages are appended to a log file named install_log.txt
located in the same directory as the script.
Here are some example log entries:
Information Logs:
2024-07-18 12:00:00 [INFO] Starting LibreOffice installation process. 2024-07-18 12:01:00 [INFO] Downloading LibreOffice installer... 2024-07-18 12:02:00 [INFO] Download completed successfully. 2024-07-18 12:03:00 [INFO] Installing LibreOffice...
Error Logs:
2024-07-18 12:01:00 [ERROR] Failed to download the LibreOffice installer. 2024-07-18 12:04:00 [ERROR] Failed to install LibreOffice.
Run PowerShell as Administrator: Right-click on PowerShell and select "Run as administrator" .
Navigate to Script Directory: Use cd
to navigate to the directory containing the script.
Run the Script:
.LibreOffice-Auto-Installer.ps1
If the script doesn't run, change the execution policy:
Set-ExecutionPolicy Bypass -Scope Process
if a message pops up red
type Y
then click enter.
Then run the script again without closing PowerShell.
.LibreOffice-Auto-Installer.ps1
Administrator Check: Ensures the script is run with administrator privileges .
Automatic Download: Downloads the latest version of LibreOffice from the official mirror .
Silent Installation: Installs LibreOffice silently without user interaction .
Custom Installation Path: Allows specifying a custom installation path for LibreOffice.
Clean Up: Deletes the installer file after the installation is complete ?.
You can customize the installation by modifying the following variables in the script:
$LibreOfficeURL
: URL to the LibreOffice installer. Update this to change the version being installed.
$installPathLibreOffice
: Path where LibreOffice will be installed. Modify this to change the installation directory.
This script is released under the MIT License. See the LICENSE for more details ?.