Top Related Projects
PowerShell for every system!
A command-line installer for Windows.
Chocolatey - the package manager for Windows
A command-line installer for Windows.
Lovely console emulator package for Windows
Quick Overview
BatUtil is a collection of batch scripts and utilities for Windows systems. It provides various tools for system administration, software deployment, and automation tasks, primarily focused on Windows operating systems.
Pros
- Comprehensive set of utilities for Windows system management
- Regularly updated with new features and improvements
- Open-source and freely available for use and modification
- Well-documented scripts with clear comments and instructions
Cons
- Limited to Windows operating systems
- Requires some knowledge of batch scripting to fully utilize
- May require administrative privileges for certain operations
- Some scripts might be complex for beginners to understand and modify
Code Examples
As BatUtil is a collection of batch scripts rather than a code library, traditional code examples are not applicable. However, here are a few snippets from different scripts to illustrate their functionality:
- From
CleanupOldProfiles.cmd
(Cleaning up old user profiles):
for /f "tokens=*" %%a in ('dir /b /ad "%SystemDrive%\Users"') do (
if /i not "%%a"=="Public" if /i not "%%a"=="Default" if /i not "%%a"=="Default User" if /i not "%%a"=="All Users" (
if exist "%SystemDrive%\Users\%%a\NTUSER.DAT" (
reg load HKU\TempHive "%SystemDrive%\Users\%%a\NTUSER.DAT" >nul 2>&1
if %errorlevel% EQU 0 (
reg unload HKU\TempHive >nul 2>&1
) else (
echo Deleting profile: %%a
rmdir /s /q "%SystemDrive%\Users\%%a"
)
)
)
)
- From
SetupComplete.cmd
(Configuring system settings after Windows installation):
@echo off
set "PATH=%SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\wbem;%SystemRoot%\System32\WindowsPowerShell\v1.0\"
REM Disable Windows Defender
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v DisableAntiSpyware /t REG_DWORD /d 1 /f
REM Disable Automatic Updates
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoUpdate /t REG_DWORD /d 1 /f
REM Set power plan to High Performance
powercfg /setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
Getting Started
To use BatUtil:
- Clone or download the repository from GitHub:
git clone https://github.com/abbodi1406/BatUtil.git
- Navigate to the desired script in the repository
- Run the script with administrative privileges (right-click and select "Run as administrator")
- Follow any on-screen prompts or instructions provided by the script
Note: Always review scripts before running them, especially those requiring administrative privileges, to ensure they perform the desired actions on your system.
Competitor Comparisons
PowerShell for every system!
Pros of PowerShell
- More powerful and versatile scripting language with object-oriented capabilities
- Cross-platform support (Windows, macOS, Linux)
- Extensive built-in cmdlets and modules for system administration tasks
Cons of PowerShell
- Steeper learning curve, especially for users familiar with batch scripting
- Larger footprint and potentially slower execution for simple tasks
- May require additional setup on non-Windows systems
Code Comparison
BatUtil (Batch script):
@echo off
setlocal EnableDelayedExpansion
set "params=%*"
cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
PowerShell:
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs
exit
}
The code comparison shows how both scripts handle administrative privileges, with BatUtil using a more complex batch script approach, while PowerShell offers a more concise and readable solution.
A command-line installer for Windows.
Pros of Scoop
- Cross-platform package manager for Windows, offering a wide range of software installations
- Provides a consistent and streamlined installation process for various applications
- Allows easy updating and management of installed software through command-line interface
Cons of Scoop
- Requires PowerShell and some command-line knowledge, which may be less user-friendly for beginners
- Limited to software available in its repositories or user-contributed "buckets"
- May not always have the latest versions of software immediately available
Code Comparison
BatUtil (batch script example):
@echo off
setlocal EnableDelayedExpansion
set "params=%*"
cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
Scoop (PowerShell script example):
$repo = "https://github.com/ScoopInstaller/Scoop.git"
$dir = "$env:USERPROFILE\scoop"
$config = "$dir\config.json"
$manifest = "$dir\apps\scoop\current\manifest.json"
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
Chocolatey - the package manager for Windows
Pros of Choco
- Extensive package management ecosystem with a large community-maintained repository
- Cross-platform support (Windows, macOS, Linux)
- Advanced features like package moderation and automated builds
Cons of Choco
- Steeper learning curve for beginners
- Requires administrative privileges for most operations
- Larger footprint and more complex installation process
Code Comparison
BatUtil (batch script):
@echo off
setlocal EnableDelayedExpansion
set "params=%*"
cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
Choco (PowerShell):
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
BatUtil focuses on Windows-specific batch scripting for system utilities, while Choco provides a more comprehensive package management solution with cross-platform capabilities. BatUtil is lighter and simpler for basic Windows tasks, whereas Choco offers a robust ecosystem at the cost of increased complexity.
A command-line installer for Windows.
Pros of Scoop
- Cross-platform package manager for Windows, offering a wide range of software installations
- Provides a consistent and streamlined installation process for various applications
- Allows easy updating and management of installed software through command-line interface
Cons of Scoop
- Requires PowerShell and some command-line knowledge, which may be less user-friendly for beginners
- Limited to software available in its repositories or user-contributed "buckets"
- May not always have the latest versions of software immediately available
Code Comparison
BatUtil (batch script example):
@echo off
setlocal EnableDelayedExpansion
set "params=%*"
cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
Scoop (PowerShell script example):
$repo = "https://github.com/ScoopInstaller/Scoop.git"
$dir = "$env:USERPROFILE\scoop"
$config = "$dir\config.json"
$manifest = "$dir\apps\scoop\current\manifest.json"
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
Lovely console emulator package for Windows
Pros of Cmder
- Provides a full-featured console emulator with a rich user interface
- Includes built-in support for popular shells like PowerShell and Git Bash
- Offers extensive customization options for appearance and functionality
Cons of Cmder
- Larger installation size and resource footprint
- May have a steeper learning curve for users new to console emulators
- Less focused on specific batch file utilities compared to BatUtil
Code Comparison
BatUtil (batch file utility):
@echo off
setlocal EnableDelayedExpansion
set "params=%*"
set "params=!params:"=!"
Cmder (ConEmu configuration):
<key name="Tasks" modified="2022-03-01 12:00:00" build="210912">
<value name="{Shells::PowerShell}" type="string" data="<?xml version="1.0" encoding="utf-8"?>
<key name="Tasks">
<value name="Task1" type="string" data="PowerShell"/>
</key>"/>
</key>
BatUtil focuses on providing utility functions for batch files, while Cmder offers a more comprehensive console emulation experience with additional features and customization options. BatUtil is lightweight and specific to batch scripting, whereas Cmder provides a complete environment for various shells and command-line tools.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Utility Name | Description |
---|---|
BatUtil | Collection of batch scripts utilities for Windows. For download releases, see here |
W10UI | Windows 10 Updates Installer. Install/integrate Windows 10 Updates. |
WHD-W8.1UI | Windows 8.1 Updates Installer. Install/integrate Windows 8.1 Updates, depending on WHDownloader repository. |
WHD-W7UI | Windows 7 Updates Installer. Install/integrate Windows 7 Updates, depending on WHDownloader repository. |
W81ESUI | Standalone Installer for Windows 8.1 / Embedded / Server 2012 R2 Extended Security Updates. |
W7ESUI | Standalone Installer for Windows 7 / Embedded / Server 2008 R2 Extended Security Updates. |
EdgeChromiumInstaller | Install Microsoft Edge (Chromium) offline with working Edge Update |
uup-converter-wimlib | UUP -> ISO Converter ft. WimLib. Process and convert Microsoft Windows 10 Unified Update Platform files into a usable state (ISO / WIM). |
esd-decrypter-wimlib | ESD -> ISO Decrypter ft. WimLib. Process and convert Microsoft Windows 10 full ESD files (encrypted or decrypted) into a usable state (ISO / WIM / decrypted ESD). |
YAOCTRI | Yet Another Office Click-To-Run Installer. Install Office Click To Run from offline source without using Office Deployment Tool (setup.exe). |
OfficeC2R-R2V | Office Click To Run 365/2021/2019/2016/2013 licensing converter from Retail to Volume. |
OfficeScrubber | Scrub/Remove Office (MSI or Click-to-Run), from 2003 to 2021. |
OfficeMSPs | Office MSP Updates Organizer. Extract and prepare Office msp files from global exe/cab update files to a folder with meaningful names. |
OfficeUpdates | Installer for Microsoft Office Updates. Install MSI-based Office 2010/2013/2016 updates directly from exe/cab/msp files. |
W10MUI | Windows 10 Multilingual Distribution Creator. Add language packs to Windows 10 distribution, resulting a multilingual ISO/WIM. |
W8.1MUI | Windows 8.1 Multilingual Distribution Creator. Add language packs to Windows 8.1 distribution, resulting a multilingual ISO/WIM. |
W7MUI | Windows 7 Multilingual Distribution Creator. Add language packs to Windows 7 distribution, resulting a multilingual ISO/WIM. |
ESD2CAB-CAB2ESD | Convert Windows 10 UUP's ESD files to CAB files and vice versa |
ESD2WIM-WIM2ESD | Convert Solid-compressed ESD file to a Regular-compressed WIM file and vice versa. |
ActionListUUP | Create ActionList.xml file to be used with WindowsUpdateBox.exe to directly upgrade from Windows 10 UUP files set. |
WinDLS | Windows Display Language Switcher. Install and change "Display Language" for Windows Editions (SKUs) that are not alllowed to have multiple languages by default. |
Win81Bing | Convert leaked Windows 8.1 with Bing ISOs to other languages. |
PSFX_MSU | Create Windows 11 LCU MSU file out of the UUP update files. |
PSFX_Repack | Extract PSFX format psf/cab files, and repackage into a full cab or esd file. |
Top Related Projects
PowerShell for every system!
A command-line installer for Windows.
Chocolatey - the package manager for Windows
A command-line installer for Windows.
Lovely console emulator package for Windows
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot