Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <# ::
- @echo off & setlocal
- :: CHECK FOR ADMIN
- net file >nul 2>&1
- if %errorlevel% NEQ 0 (echo;Please run as admin.&pause>nul &exit)
- powershell -noprofile -nologo "iex (${%~f0} | out-string)"
- goto:eof
- ::#>
- taskkill /f /im explorer.exe
- taskkill /f /im StartAllBackCfg.exe
- <# -- LIBRARY -- #>
- function Expand-EnvVar($Path) {
- return [System.Environment]::ExpandEnvironmentVariables($Path)
- }
- New-Alias -Name ee -Value Expand-EnvVar
- function Edit-FileBytes($Path, $Modifications) {
- $Path = ee "$Path"
- $bytes = [System.IO.File]::ReadAllBytes($Path)
- foreach ($mod in $Modifications) {
- if ($mod -match '(\d+)-(\d+)=(\d+)') {
- $matches[1]..$matches[2] | ForEach-Object { $bytes[$_] = $matches[3] }
- } elseif ($mod -match '(\d+)=(\d+)') {
- $bytes[$matches[1]] = $matches[2]
- }
- }
- [System.IO.File]::WriteAllBytes($Path, $bytes)
- }
- <# -- FILES -- #>
- Edit-FileBytes '%programfiles%\StartAllBack\StartAllBackX64.dll' '5096=103','5097=199','5098-5099=1','5100-5102=0','5103=184','5104=1','5105-5107=0','5108=195','5109-5111=144'
- Write-Host Complete!
- start explorer.exe
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement