I am using Windows 11 Single Language on my laptop.
Recently, I wanted to enable Windows Sandbox, which is not available in my edition. I tried running a script that downloaded a Windows image something and restarted my laptop.
After that:
Many settings went missing, such as Windows Update, Recovery, and Reset options.
I decided to perform an in-place upgrade (repair install) using the Windows 11 Media Creation Tool to keep my apps and data.
However, the upgrade fails every time with the error:
This is the detail of script that i run to install the sandbox and i found on virustotal that it contain a malware
@echo off
echo Checking for permissions
nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
echo Permission check result: %errorlevel%
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
echo Running created temporary "%temp%\getadmin.vbs"
timeout /T 2
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
echo Batch was successfully started with admin privileges
echo .
cls
Title Sandbox Installer
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages*Containers*.mum >sandbox.txt
for /f %%i in ('findstr /i . sandbox.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages%%i"
del sandbox.txt
Dism /online /enable-feature /featurename:Containers-DisposableClientVM /LimitAccess /ALL
pause
Later i found that this script is flagged as a malware
Additional Context Before Installing Sandbox:(Why I require sandbox)
Before attempting to install the Sandbox feature, I tried to clean my system in order to get a free trial of certain software. I:
Manually deleted some registry keys related to that software
- Used both Revo Unistaller to delete related files and Revo Registry Cleaner Advanced Registry Scan to delete other unused or invalid registry entries
After these changes, I later ran the Sandbox installation script (mentioned above), which may have further modified my system.
I only want to reinstall or in place upgrade of window 11 without losing any app and file :)