This batch script performs the following tasks: ### **UAC Elevation** 1. The...
August 23, 2025 at 05:54 PM
This batch script performs the following tasks:
UAC Elevation
- The code begins by checking if UAC (User Account Control) elevation is needed:
if exist "%vbs%" del "%vbs%"
- Checks for an existing VBScript file (%vbs%
) and deletes it.fsutil dirty query %systemdrive%
- Tests if administrative privileges are required. If privileges are not granted (an error is encountered), the block below executes:- A VBScript snippet is dynamically created to invoke the batch script with elevated privileges using UAC (
ShellExecute
statement). %vbs%
is executed to elevate privileges and then deleted.- The script exits after attempting privilege elevation.
- A VBScript snippet is dynamically created to invoke the batch script with elevated privileges using UAC (
Driver Setup
- Checks for and sets up a kernel-mode driver:
set DRIVERNAME=atvi-randgrid_sr_offline
- Specifies the driver name.set EXENAME=sp24-cod.exe
andset DIRNAME=sp24
- Specifies the executable (sp24-cod.exe
) and directory (sp24
) name for the game.sc query %DRIVERNAME%
- Queries if the driver (atvi-randgrid_sr_offline
) is already installed.- If the driver exists (
errorlevel == 0
), it outputs a message and skips directly to the game launch (goto startgame
). - If the driver does not exist (
errorlevel != 0
), it installs the driver viasc.exe create
.sc.exe create %DRIVERNAME%
- Creates a kernel-mode driver service.sc.exe sdset %DRIVERNAME%
- Sets security permissions for the newly created driver.- Outputs a message indicating successful driver installation.
- If the driver exists (
Game Execution
- Prepares for and launches the game:
- Copies
bootstrapper.exe
andbootstrapperCrashHandler.exe
into the game directory (sp24
) if they do not already exist. - Changes into the game directory (
cd %DIRNAME%
) and launchesbootstrapper.exe
with the game executable (sp24-cod.exe
). - Error Handling:
- Captures the exit code of
bootstrapper.exe
intoBOOTSTRAPPERERRORLEVEL
. - If
BOOTSTRAPPERERRORLEVEL != 0
, displays an error message referring to thebootstrapper.log
file in the game directory and exits.
- Captures the exit code of
- Copies
Cleanup
- Performs cleanup tasks:
- Deletes the installed driver using
sc.exe delete %DRIVERNAME%
. - Terminates and deletes any
bootstrapperCrashHandler.exe
instances. - Deletes the
bootstrapper.exe
andbootstrapperCrashHandler.exe
files. - Removes a specific folder (
%APPDATA%\r4v3n_steam_files
) recursively and silently. - Waits for 1 second using
timeout 1
before exiting.
- Deletes the installed driver using
Summary
- Elevates the script to administrative privileges if necessary.
- Checks for and installs a kernel-mode driver (
Randgrid.sys
) if not already installed. - Prepares the directory structure and resources for the game (
sp24
). - Launches the game and monitors the result.
- Cleans up temporary files, removes the driver, and exits gracefully.
Generate your own explanations
Download our vscode extension
Read other generated explanations
Built by @thebuilderjr
Sponsored by beam analytics
Read our terms and privacy policy
Forked from openai-quickstart-node