Convert Figma logo to code with AI

abbodi1406 logoBatUtil

Collection of batch scripts utilities for Windows

1,070
249
1,070
8

Top Related Projects

PowerShell for every system!

21,439

A command-line installer for Windows.

10,466

Chocolatey - the package manager for Windows

21,444

A command-line installer for Windows.

26,028

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:

  1. 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"
            )
        )
    )
)
  1. 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:

  1. Clone or download the repository from GitHub: git clone https://github.com/abbodi1406/BatUtil.git
  2. Navigate to the desired script in the repository
  3. Run the script with administrative privileges (right-click and select "Run as administrator")
  4. 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.

21,439

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')
10,466

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.

21,444

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')
26,028

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="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
        &lt;key name=&quot;Tasks&quot;&gt;
            &lt;value name=&quot;Task1&quot; type=&quot;string&quot; data=&quot;PowerShell&quot;/&gt;
        &lt;/key&gt;"/>
</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 Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Utility NameDescription
BatUtilCollection of batch scripts utilities for Windows. For download releases, see here
W10UIWindows 10 Updates Installer. Install/integrate Windows 10 Updates.
WHD-W8.1UIWindows 8.1 Updates Installer. Install/integrate Windows 8.1 Updates, depending on WHDownloader repository.
WHD-W7UIWindows 7 Updates Installer. Install/integrate Windows 7 Updates, depending on WHDownloader repository.
W81ESUIStandalone Installer for Windows 8.1 / Embedded / Server 2012 R2 Extended Security Updates.
W7ESUIStandalone Installer for Windows 7 / Embedded / Server 2008 R2 Extended Security Updates.
EdgeChromiumInstallerInstall Microsoft Edge (Chromium) offline with working Edge Update
uup-converter-wimlibUUP -> ISO Converter ft. WimLib. Process and convert Microsoft Windows 10 Unified Update Platform files into a usable state (ISO / WIM).
esd-decrypter-wimlibESD -> ISO Decrypter ft. WimLib. Process and convert Microsoft Windows 10 full ESD files (encrypted or decrypted) into a usable state (ISO / WIM / decrypted ESD).
YAOCTRIYet Another Office Click-To-Run Installer. Install Office Click To Run from offline source without using Office Deployment Tool (setup.exe).
OfficeC2R-R2VOffice Click To Run 365/2021/2019/2016/2013 licensing converter from Retail to Volume.
OfficeScrubberScrub/Remove Office (MSI or Click-to-Run), from 2003 to 2021.
OfficeMSPsOffice MSP Updates Organizer. Extract and prepare Office msp files from global exe/cab update files to a folder with meaningful names.
OfficeUpdatesInstaller for Microsoft Office Updates. Install MSI-based Office 2010/2013/2016 updates directly from exe/cab/msp files.
W10MUIWindows 10 Multilingual Distribution Creator. Add language packs to Windows 10 distribution, resulting a multilingual ISO/WIM.
W8.1MUIWindows 8.1 Multilingual Distribution Creator. Add language packs to Windows 8.1 distribution, resulting a multilingual ISO/WIM.
W7MUIWindows 7 Multilingual Distribution Creator. Add language packs to Windows 7 distribution, resulting a multilingual ISO/WIM.
ESD2CAB-CAB2ESDConvert Windows 10 UUP's ESD files to CAB files and vice versa
ESD2WIM-WIM2ESDConvert Solid-compressed ESD file to a Regular-compressed WIM file and vice versa.
ActionListUUPCreate ActionList.xml file to be used with WindowsUpdateBox.exe to directly upgrade from Windows 10 UUP files set.
WinDLSWindows Display Language Switcher. Install and change "Display Language" for Windows Editions (SKUs) that are not alllowed to have multiple languages by default.
Win81BingConvert leaked Windows 8.1 with Bing ISOs to other languages.
PSFX_MSUCreate Windows 11 LCU MSU file out of the UUP update files.
PSFX_RepackExtract PSFX format psf/cab files, and repackage into a full cab or esd file.