Browse Source

Included Joe's wallpaper script, PERM.bat now has it's own YAML file, edited SLNT.bat

master
yoh 1 year ago
parent
commit
e5bea94433
6 changed files with 77 additions and 40 deletions
  1. +1
    -0
      Configuration/custom.yml
  2. +8
    -0
      Configuration/features/base/permission.yml
  3. +3
    -2
      Configuration/features/base/silent.yml
  4. +0
    -1
      Executables/ADMIN.bat
  5. +3
    -8
      Executables/SLNT.bat
  6. +62
    -29
      Executables/WALLPAPER.bat

+ 1
- 0
Configuration/custom.yml View File

@ -12,4 +12,5 @@ features:
- features/base/silent.yml
- features/base/login.yml
- features/base/wallpaper.yml
- features/base/permission.yml
- features/base/admin.yml

+ 8
- 0
Configuration/features/base/permission.yml View File

@ -0,0 +1,8 @@
---
title: Permission
description: Sets UAC level and user permissions
privilege: Admin
actions:
- !run:
currentDir: true
exe: "PERM.bat"

+ 3
- 2
Configuration/features/base/silent.yml View File

@ -3,5 +3,6 @@ title: Silent Installers
description: Silent Installers for Windows 7 Calculator, OldNewExplorer, and Hardentools
privilege: Admin
actions:
- !cmd:
command: "cd Executables & SLNT.bat"
- !run:
currentDir: true
exe: "SLNT.bat"

+ 0
- 1
Executables/ADMIN.bat View File

@ -1,4 +1,3 @@
call PERM.bat
net user administrator /active:yes
net user Administrator malte
net localgroup administrators %username% /delete

+ 3
- 8
Executables/SLNT.bat View File

@ -1,3 +1,4 @@
cd Executables
if exist OldCalculatorforWindows10Cfg.exe (
del OldCalculatorforWindows10Cfg.exe /f /q
)
@ -9,19 +10,13 @@ if exist OldNewExplorerCfg.exe (
.\7za.exe e .\silent_installers.7z -pwizard
::Install Old Calculator For Windows 10
:calc
start OldCalculatorforWindows10Cfg.exe
timeout /t 15
reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\calc.exe"
if %ERRORLEVEL% NEQ 0 goto calc
::Install OldNewExplorer
:oldnewexplorer
start OldNewExplorerCfg.exe
@powershell -NoProfile -ExecutionPolicy Bypass -File Enter.ps1
timeout /t 2
timeout /t 15
taskkill /im OldNewExplorerCfg.exe
::Configure OldNewExplorer
@ -29,7 +24,7 @@ reg add HKEY_CURRENT_USER\SOFTWARE\Tihiy\OldNewExplorer /v Details /t REG_DWORD
reg add HKEY_CURRENT_USER\SOFTWARE\Tihiy\OldNewExplorer /v DriveGrouping /t REG_DWORD /d 1 /f
reg add HKEY_CURRENT_USER\SOFTWARE\Tihiy\OldNewExplorer /v HideFolders /t REG_DWORD /d 1 /f
reg add HKEY_CURRENT_USER\SOFTWARE\Tihiy\OldNewExplorer /v IEButtons /t REG_DWORD /d 0 /f
reg add HKEY_CURRENT_USER\SOFTWARE\Tihiy\OldNewExplorer /v NavBarGlass /t REG_DWORD /d 1 /f
reg add HKEY_CURRENT_USER\SOFTWARE\Tihiy\OldNewExplorer /v NavBarGlass /t REG_DWORD /d 0 /f
reg add HKEY_CURRENT_USER\SOFTWARE\Tihiy\OldNewExplorer /v NoCaption /t REG_DWORD /d 1 /f
reg add HKEY_CURRENT_USER\SOFTWARE\Tihiy\OldNewExplorer /v NoIcon /t REG_DWORD /d 1 /f
reg add HKEY_CURRENT_USER\SOFTWARE\Tihiy\OldNewExplorer /v NoRibbon /t REG_DWORD /d 1 /f

+ 62
- 29
Executables/WALLPAPER.bat View File

@ -1,29 +1,62 @@
cd Executables
takeown /f C:\Windows\Web\Screen\*.jpg
icacls C:\Windows\Web\Screen\*.jpg /reset
takeown /f C:\Windows\Web\Screen\*.png
icacls C:\Windows\Web\Screen\*.png /reset
takeown /f C:\Windows\Web\Wallpaper\Windows\*.jpg
icacls C:\Windows\Web\Wallpaper\Windows\*.jpg /reset
takeown /f C:\Windows\Web\4K\Wallpaper\Windows\*.jpg
icacls C:\Windows\Web\4K\Wallpaper\Windows\*.jpg /reset
copy img100.jpg C:\Windows\Web\Screen\ /Y
copy img103.png C:\Windows\Web\Screen\ /Y
copy img0.jpg C:\Windows\Web\Wallpaper\Windows\ /Y
copy img0_*.jpg C:\Windows\Web\4K\Wallpaper\Windows\ /Y
copy *.bmp C:\Windows\Web\Wallpaper\Windows\ /Y
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d C:\Windows\Web\Wallpaper\Windows\ame_wallpaper_1440.bmp /f
start RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
:: Delete Cache
takeown /f C:\ProgramData\Microsoft\Windows\SystemData
icacls C:\ProgramData\Microsoft\Windows\SystemData /reset
takeown /f C:\ProgramData\Microsoft\Windows\SystemData\S-1-5-18
icacls C:\ProgramData\Microsoft\Windows\SystemData\S-1-5-18 /reset
takeown /f C:\ProgramData\Microsoft\Windows\SystemData\S-1-5-18\ReadOnly
icacls C:\ProgramData\Microsoft\Windows\SystemData\S-1-5-18\ReadOnly /reset
takeown /f C:\ProgramData\Microsoft\Windows\SystemData\S-1-5-18\ReadOnly\LockScreen_Z
icacls C:\ProgramData\Microsoft\Windows\SystemData\S-1-5-18\ReadOnly\LockScreen_Z /reset
takeown /f C:\ProgramData\Microsoft\Windows\SystemData\S-1-5-18\ReadOnly\LockScreen_Z\*.jpg
icacls C:\ProgramData\Microsoft\Windows\SystemData\S-1-5-18\ReadOnly\LockScreen_Z\*.jpg /reset
del C:\ProgramData\Microsoft\Windows\SystemData\S-1-5-18\ReadOnly\LockScreen_Z\*.jpg /f /q
@ECHO OFF
CD Executables
IF NOT EXIST "%WINDIR%\Web\Wallpaper\Windows" SET "wallFail=true" & GOTO lockScreen
IF EXIST "%APPDATA%\Microsoft\Windows\Themes\Transcoded_000" SET "wallFail=true" & GOTO lockScreen
IF NOT EXIST "%APPDATA%\Microsoft\Windows\Themes\TranscodedWallpaper" SET "wallFail=true" & GOTO lockScreen
POWERSHELL -NoP -C "Add-Type -AssemblyName System.Drawing; $img = New-Object System.Drawing.Bitmap '%APPDATA%\Microsoft\Windows\Themes\TranscodedWallpaper'; if ($img.Flags -ne 77840) {EXIT 1}; if ($img.HorizontalResolution -ne 96) {EXIT 1}; if ($img.VerticalResolution -ne 96) {EXIT 1}; if ($img.PropertyIdList -notcontains 40961) {EXIT 1}; if ($img.PropertyIdList -notcontains 20624) {EXIT 1}; if ($img.PropertyIdList -notcontains 20625) {EXIT 1}"
IF %ERRORLEVEL% NEQ 0 SET "wallChanged=true" & GOTO lockScreen
TAKEOWN /F "%WINDIR%\Web\4K\Wallpaper\Windows\*.jpg" > NUL
ICACLS "%WINDIR%\Web\4K\Wallpaper\Windows\*.jpg" /reset > NUL
COPY img0_*.jpg "%WINDIR%\Web\4K\Wallpaper\Windows\" /Y > NUL
TAKEOWN /F "%WINDIR%\Web\Wallpaper\Windows\img0.jpg" > NUL 2>&1
ICACLS "%WINDIR%\Web\Wallpaper\Windows\img0.jpg" /reset > NUL
COPY "img0.jpg" "%WINDIR%\Web\Wallpaper\Windows\img0.jpg" /Y > NUL 2>&1
COPY "ame_wallpaper_1440.bmp" "%WINDIR%\Web\Wallpaper\Windows\" /Y > NUL 2>&1
IF NOT EXIST "%WINDIR%\Web\Wallpaper\Windows\ame_wallpaper_1440.bmp" SET "wallFail=true" & GOTO lockScreen
REG ADD "HKCU\Control Panel\Desktop" /v WallPaper /t REG_SZ /d "%WINDIR%\Web\Wallpaper\Windows\ame_wallpaper_1440.bmp" /f > NUL
IF %ERRORLEVEL% NEQ 0 SET "wallFail=true" & GOTO lockScreen
:lockScreen
FOR /F "tokens=2* delims=\" %%B IN ('WMIC computersystem get username') DO SET "currentUsername=%%B"
SET "currentUsername=%currentUsername:~0,-3%"
REM Detection for if user changed their username without restarting
ECHO "%currentUsername%" | FINDSTR /I /X /c:""""~0,-3""" ">NUL 2>&1 && SET "currentUsername=%username%"
FOR /F "usebackq tokens=1 delims= " %%A IN (`WMIC useraccount where "name="%currentUsername%"" get sid 2^>^&1 ^| FINDSTR "S-"`) DO SET "userSID=%%A"
REG QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Creative\%userSID%" /v "RotatingLockScreen*" > NUL 2>&1
IF %ERRORLEVEL% NEQ 0 (
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Creative\%userSID%" /v "RotatingLockScreenEnabled" /t REG_DWORD /d 0 /f > NUL
REG ADD "HKU\%userSID%\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "RotatingLockScreenEnabled" /t REG_DWORD /d 0 /f > NUL
TAKEOWN /F "%WINDIR%\Web\Screen\img100.jpg">NUL 2>&1 & TAKEOWN /F "%WINDIR%\Web\Screen\img103.png">NUL 2>&1 & TAKEOWN /F "%WINDIR%\Web\Wallpaper\Windows\img0.jpg" > NUL 2>&1
ICACLS "%WINDIR%\Web\Screen\img100.jpg" /reset>NUL & ICACLS "%WINDIR%\Web\Screen\img103.png" /reset>NUL & ICACLS "%WINDIR%\Web\Wallpaper\Windows\img0.jpg" /reset > NUL
COPY "img100.jpg" "%WINDIR%\Web\Screen\img100.jpg" /Y > NUL
COPY "img103.png" "%WINDIR%\Web\Screen\img103.png" /Y > NUL
COPY "img0.jpg" "%WINDIR%\Web\Wallpaper\Windows\img0.jpg" /Y > NUL 2>&1
REM Clear cache
TAKEOWN /R /D Y /F "%PROGRAMDATA%\Microsoft\Windows\SystemData" > NUL
ICACLS "%PROGRAMDATA%\Microsoft\Windows\SystemData" /reset /t > NUL
FOR /D %%A IN ("%PROGRAMDATA%\Microsoft\Windows\SystemData\*") DO (
FOR /D %%B IN ("%%A\ReadOnly\LockScreen_*") DO RMDIR /S /Q "%%B"
)
IF "%wallChanged%"=="true" EXIT /B 1
IF "%wallFail%"=="true" EXIT /B 4
) ELSE (
IF "%wallChanged%"=="true" EXIT /B 3
IF "%wallFail%"=="true" EXIT /B 5
EXIT /B 2
)
EXIT /B 0

Loading…
Cancel
Save