-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwinsxs & installer compressor win7.bat
51 lines (31 loc) · 1.19 KB
/
winsxs & installer compressor win7.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
@echo off
echo This Compressor is made thanks to...
echo Author: Rin Minase
echo.
echo.
echo Preparing compression algorithm in 10 seconds
timeout /t 10 /nobreak
@echo on
sc stop msiserver
sc stop TrustedInstaller
sc config msiserver start= disabled
sc config TrustedInstaller start= disabled
icacls "%windir%\winsxs" /save "%windir%\winsxs.acl" /t /c
takeown /f "%windir%\winsxs" /r
icacls "%windir%\winsxs" /grant "%userdomain%\%username%":(F) /t /c
compact /c /s:"%windir%\winsxs" /a /i /f
icacls "%windir%" /restore "%windir%\winsxs.acl" /c
del "%windir%\winsxs.acl"
icacls "%windir%\System32\DriverStore\FileRepository" /save "%windir%\FileRepository.acl" /t /c
takeown /f "%windir%\System32\DriverStore\FileRepository" /r
icacls "%windir%\System32\DriverStore\FileRepository" /grant "%userdomain%\%username%":(F) /t /c
compact /c /s:"%windir%\System32\DriverStore\FileRepository" /a /i /f
icacls "%windir%\System32\DriverStore" /restore "%windir%\FileRepository.acl" /c
del "%windir%\FileRepository.acl"
sc config msiserver start= demand
sc config TrustedInstaller start= demand
@echo off
echo Compressing "Windows\Installer" Folder
@echo on
compact /c /s:"%windir%\installer" /a /i /f
pause