Skip to content

Commit 0d26ba0

Browse files
committed
Use %syspath%
1 parent 3fd1666 commit 0d26ba0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

MAS/Separate-Files-Version/Troubleshoot.cmd

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ echo:
844844

845845
if %counter% EQU 0 (
846846
echo:
847-
echo Installed Office is not found.
847+
echo Office ^(2010 and later^) is not installed.
848848
goto :repairend
849849
echo:
850850
) else (
@@ -983,8 +983,8 @@ exit
983983

984984
echo:
985985
echo Deleting WMI repository
986-
rmdir /s /q "%windir%\System32\wbem\repository\" %nul%
987-
if exist "%windir%\System32\wbem\repository\" (
986+
rmdir /s /q "%SysPath%\wbem\repository\" %nul%
987+
if exist "%SysPath%\wbem\repository\" (
988988
call :dk_color %Red% "[Failed]"
989989
) else (
990990
echo [Successful]
@@ -1029,9 +1029,9 @@ goto :at_back
10291029
:: https://eskonr.com/2012/01/how-to-fix-wmi-issues-automatically/
10301030

10311031
%psc% Stop-Service Winmgmt -force %nul%
1032-
cd /d %systemroot%\system32\wbem\
1033-
regsvr32 /s %systemroot%\system32\scecli.dll
1034-
regsvr32 /s %systemroot%\system32\userenv.dll
1032+
cd /d %SysPath%\wbem\
1033+
regsvr32 /s %SysPath%\scecli.dll
1034+
regsvr32 /s %SysPath%\userenv.dll
10351035
mofcomp cimwin32.mof
10361036
mofcomp cimwin32.mfl
10371037
mofcomp rsop.mof
@@ -1277,9 +1277,9 @@ function ReinstallLicenses() {
12771277

12781278
set token=
12791279
for %%# in (
1280-
%Systemdrive%\Windows\System32\spp\store_test\2.0\
1281-
%Systemdrive%\Windows\System32\spp\store\
1282-
%Systemdrive%\Windows\System32\spp\store\2.0\
1280+
%SysPath%\spp\store_test\2.0\
1281+
%SysPath%\spp\store\
1282+
%SysPath%\spp\store\2.0\
12831283
%Systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\
12841284
) do (
12851285

0 commit comments

Comments
 (0)