Use %syspath%

This commit is contained in:
WindowsAddict 2024-08-19 19:07:39 +05:30
parent 3fd1666926
commit 0d26ba046e
1 changed files with 9 additions and 9 deletions

View File

@ -844,7 +844,7 @@ echo:
if %counter% EQU 0 ( if %counter% EQU 0 (
echo: echo:
echo Installed Office is not found. echo Office ^(2010 and later^) is not installed.
goto :repairend goto :repairend
echo: echo:
) else ( ) else (
@ -983,8 +983,8 @@ exit
echo: echo:
echo Deleting WMI repository echo Deleting WMI repository
rmdir /s /q "%windir%\System32\wbem\repository\" %nul% rmdir /s /q "%SysPath%\wbem\repository\" %nul%
if exist "%windir%\System32\wbem\repository\" ( if exist "%SysPath%\wbem\repository\" (
call :dk_color %Red% "[Failed]" call :dk_color %Red% "[Failed]"
) else ( ) else (
echo [Successful] echo [Successful]
@ -1029,9 +1029,9 @@ goto :at_back
:: https://eskonr.com/2012/01/how-to-fix-wmi-issues-automatically/ :: https://eskonr.com/2012/01/how-to-fix-wmi-issues-automatically/
%psc% Stop-Service Winmgmt -force %nul% %psc% Stop-Service Winmgmt -force %nul%
cd /d %systemroot%\system32\wbem\ cd /d %SysPath%\wbem\
regsvr32 /s %systemroot%\system32\scecli.dll regsvr32 /s %SysPath%\scecli.dll
regsvr32 /s %systemroot%\system32\userenv.dll regsvr32 /s %SysPath%\userenv.dll
mofcomp cimwin32.mof mofcomp cimwin32.mof
mofcomp cimwin32.mfl mofcomp cimwin32.mfl
mofcomp rsop.mof mofcomp rsop.mof
@ -1277,9 +1277,9 @@ function ReinstallLicenses() {
set token= set token=
for %%# in ( for %%# in (
%Systemdrive%\Windows\System32\spp\store_test\2.0\ %SysPath%\spp\store_test\2.0\
%Systemdrive%\Windows\System32\spp\store\ %SysPath%\spp\store\
%Systemdrive%\Windows\System32\spp\store\2.0\ %SysPath%\spp\store\2.0\
%Systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\ %Systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\
) do ( ) do (