Compare commits

...

2 Commits

Author SHA1 Message Date
WindowsAddict c84e4b181a Evade AV's detection - 3 2024-01-01 07:39:18 +05:30
WindowsAddict 1c4e85b3e2 Fix bug in pending reboot check 2024-01-01 07:26:49 +05:30
8 changed files with 24 additions and 24 deletions

View File

@ -146,7 +146,7 @@ goto MASend
::========================================================================================================================================
:: Fix for the special characters limitation in path name
:: Fix special characters limitation in path name
set "_work=%~dp0"
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
@ -180,7 +180,7 @@ goto MASend
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg:'=''!\"' -verb runas" && exit /b
%nceline%
echo This script requires admin privileges.
echo This script needs admin rights.
echo To do so, right click on this script and select 'Run as administrator'.
goto MASend
)
@ -550,7 +550,7 @@ goto dk_done
::========================================================================================================================================
:: Fix for the special characters limitation in path name
:: Fix special characters limitation in path name
set "_work=%~dp0"
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
@ -1747,7 +1747,7 @@ goto dk_done
::========================================================================================================================================
:: Fix for the special characters limitation in path name
:: Fix special characters limitation in path name
set "_work=%~dp0"
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
@ -3046,7 +3046,7 @@ goto dk_done
::========================================================================================================================================
:: Fix for the special characters limitation in path name
:: Fix special characters limitation in path name
set "_work=%~dp0"
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
@ -3883,7 +3883,7 @@ if %_Debug% EQU 1 set _unattended=1
::========================================================================================================================================
:: Fix for the special characters limitation in path name
:: Fix special characters limitation in path name
set "_work=%~dp0"
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
@ -8718,7 +8718,7 @@ if %~z0 GEQ 200000 (set "_exitmsg=Go back") else (set "_exitmsg=Exit")
::========================================================================================================================================
:: Fix for the special characters limitation in path name
:: Fix special characters limitation in path name
set "_work=%~dp0"
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
@ -9795,7 +9795,7 @@ if %~z0 GEQ 200000 (set "_exitmsg=Go back") else (set "_exitmsg=Exit")
::========================================================================================================================================
:: Fix for the special characters limitation in path name
:: Fix special characters limitation in path name
set "_work=%~dp0"
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"

View File

@ -185,7 +185,7 @@ goto dk_done
::========================================================================================================================================
:: Fix for the special characters limitation in path name
:: Fix special characters limitation in path name
set "_work=%~dp0"
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
@ -219,7 +219,7 @@ goto dk_done
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg:'=''!\"' -verb runas" && exit /b
%eline%
echo This script requires admin privileges.
echo This script needs admin rights.
echo To do so, right click on this script and select 'Run as administrator'.
goto dk_done
)

View File

@ -184,7 +184,7 @@ goto dk_done
::========================================================================================================================================
:: Fix for the special characters limitation in path name
:: Fix special characters limitation in path name
set "_work=%~dp0"
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
@ -218,7 +218,7 @@ goto dk_done
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg:'=''!\"' -verb runas" && exit /b
%eline%
echo This script requires admin privileges.
echo This script needs admin rights.
echo To do so, right click on this script and select 'Run as administrator'.
goto dk_done
)

View File

@ -177,7 +177,7 @@ goto dk_done
::========================================================================================================================================
:: Fix for the special characters limitation in path name
:: Fix special characters limitation in path name
set "_work=%~dp0"
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
@ -211,7 +211,7 @@ goto dk_done
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg:'=''!\"' -verb runas" && exit /b
%eline%
echo This script requires admin privileges.
echo This script needs admin rights.
echo To do so, right click on this script and select 'Run as administrator'.
goto dk_done
)

View File

@ -175,7 +175,7 @@ goto Done
::========================================================================================================================================
:: Fix for the special characters limitation in path name
:: Fix special characters limitation in path name
set "_work=%~dp0"
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
@ -210,7 +210,7 @@ goto Done
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg:'=''!\"' -verb runas" && exit /b
%nceline%
echo This script requires admin privileges.
echo This script needs admin rights.
echo To do so, right click on this script and select 'Run as administrator'.
goto Done
)

View File

@ -160,7 +160,7 @@ goto ced_done
::========================================================================================================================================
:: Fix for the special characters limitation in path name
:: Fix special characters limitation in path name
set "_work=%~dp0"
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
@ -194,7 +194,7 @@ goto ced_done
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg:'=''!\"' -verb runas" && exit /b
%eline%
echo This script requires admin privileges.
echo This script needs admin rights.
echo To do so, right click on this script and select 'Run as administrator'.
goto ced_done
)
@ -742,8 +742,8 @@ exit /b
function Test-PendingReboot
{
if (Test-Path -Path "$env:windir\WinSxS\pending.xml") { return $true }
if (Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending" -EA Ignore) { return $true }
if (Get-Item "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" -EA Ignore) { return $true }
if (Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending" -EA SilentlyContinue) { return $true }
if (Get-Item "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" -EA SilentlyContinue) { return $true }
try {
$util = [wmiclass]"\\.\root\ccm\clientsdk:CCM_ClientUtilities"
$status = $util.DetermineIfRebootPending()

View File

@ -153,7 +153,7 @@ goto done2
::========================================================================================================================================
:: Fix for the special characters limitation in path name
:: Fix special characters limitation in path name
set "_work=%~dp0"
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
@ -186,7 +186,7 @@ goto done2
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg:'=''!\"' -verb runas" && exit /b
%eline%
echo This script requires admin privileges.
echo This script needs admin rights.
echo To do so, right click on this script and select 'Run as administrator'.
goto done2
)

View File

@ -138,7 +138,7 @@ goto at_done
::========================================================================================================================================
:: Fix for the special characters limitation in path name
:: Fix special characters limitation in path name
set "_work=%~dp0"
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
@ -172,7 +172,7 @@ goto at_done
%nul1% fltmc || (
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg:'=''!\"' -verb runas" && exit /b
%nceline%
echo This script requires admin privileges.
echo This script needs admin rights.
echo To do so, right click on this script and select 'Run as administrator'.
goto at_done
)