Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Maplespe committed Feb 11, 2024
2 parents 99bf603 + 6b35f5e commit 8e50e43
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 9 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ This project uses [LGNU V3 license](/COPYING.LESSER).
* Custom blend colors are available.
* Light/Dark Mode Adaptive.

This project is for Explorer only, if you want to apply the effect globally, take a look at our other project [DWMBlurGlass](https://github.com/Maplespe/DWMBlurGlass).

## Compatibility
Compatible with StartAllBack, OldNewExplorer and other software that modifies window styles.

Expand Down
2 changes: 2 additions & 0 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Add background Blur effect or Acrylic or Mica effect to explorer for win10 and w
* 可自定义混合颜色
* 亮/暗 颜色模式自适应

此项目仅针对Explorer,如果您想将效果应用到全局,请看看我们的另一个项目[DWMBlurGlass](https://github.com/Maplespe/DWMBlurGlass).

## 兼容性
与 StartAllBack、OldNewExplorer等修改窗口样式的软件兼容.

Expand Down
28 changes: 24 additions & 4 deletions build/x64/Release/register.cmd
Original file line number Diff line number Diff line change
@@ -1,16 +1,36 @@
@echo off

title Asking for administrator access
mode CON COLS=37 LINES=3
color F0
echo :::::::::::::::::::::::::::::::::::::
echo :: Requesting administrator access ::
echo :::::::::::::::::::::::::::::::::::::
cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && ""%~s0"" %Apply%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
color
cls

title Applying
call :isAdmin
if %errorlevel% == 0 (
echo Applying effects
regsvr32 "%~dp0ExplorerBlurMica.dll"
echo.
) else (
echo ÇëÒÔ¹ÜÀíÔ±Éí·ÝÔËÐÐ!
echo ���Թ���Ա��������!
echo Please run as Administrator
)

pause >nul
exit /b
echo Restarting explorer
taskkill /F /IM explorer.exe >nul
start explorer.exe
echo .
echo title Success
echo Changes applied successfully
echo You can now close this window, it will close automatically in 5 seconds
timeout /t 5 >nul
exit /b 0

:isAdmin
fsutil dirty query %systemdrive% >nul
exit /b
exit /b %errorlevel%
28 changes: 23 additions & 5 deletions build/x64/Release/uninstall.cmd
Original file line number Diff line number Diff line change
@@ -1,17 +1,35 @@
@echo off

title Asking for administrator access
mode CON COLS=37 LINES=3
color F0
echo :::::::::::::::::::::::::::::::::::::
echo :: Requesting administrator access ::
echo :::::::::::::::::::::::::::::::::::::
cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && ""%~s0"" %Apply%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
color
cls

title Uninstalling
call :isAdmin
if %errorlevel% == 0 (
regsvr32 /u "%~dp0ExplorerBlurMica.dll"
taskkill /f /im explorer.exe & explorer.exe
echo.
) else (
echo ÇëÒÔ¹ÜÀíÔ±Éí·ÝÔËÐÐ!
echo ���Թ���Ա��������!
echo Please run as Administrator
)

pause >nul
exit /b
echo Restarting explorer
taskkill /F /IM explorer.exe >nul
start explorer.exe
echo .
echo title Success
echo Changes applied successfully
echo You can now close this window, it will close automatically in 5 seconds
timeout /t 5 >nul
exit /b 0

:isAdmin
fsutil dirty query %systemdrive% >nul
exit /b
exit /b %errorlevel%

0 comments on commit 8e50e43

Please sign in to comment.