관리자 권한 실행 명령어

- CMD>
PowerShell -Command "Start-Process cmd -Verb RunAs"

- PowerShell>
Start-Process -FilePath "powershell" -Verb RunAs

- Pwsh>
Start-Process -FilePath "pwsh" -Verb RunAs

- 윈도우10 스토어 앱
PowerShell -Command Start-Process -Verb RunAs shell:AppsFolder\Microsoft.WindowsTerminal_8wekyb3d8bbwe!App

CMD/BAT파일을 EXE파일로 만드는 방법

윈도우에 포함된 IExpress 설치 패키지 생성 툴에 CMD/BAT파일만 넣어 EXE파일 생성가능


명령 프롬프트 > 생성 경로 > iexpress.exe


- New > Create new Self Extraction Directive file.

- Package purpose > Extract files and run an installation command

- 제목

- Confirmation prompt > No prompt.

- License agreement > Do not display a license.

- Packaged files > CMD파일 추가

- Install Program to Launch > cmd /c "install.cmd"

- Show window > Default

- Finished message - No message.

- Pacakage Name and Options > 제목, Store files using Long File Name inside Package

- Configure restart > No restart

- Save Self Extraction Directive > SED파일 저장


*CMD파일명이 긴 경우 중간에 "패키지내 긴 파일명 사용 옵션"을 꼭 체크해야함

윈도우 사운드 노멀라이징 기능 바로 실행 커맨드


사용중인 기기 Loudness Equalization 기능이 있는지 확인




레지스트리 키 찾는 방법

\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render 아래에 등록된 장치 중 Properties 키 안에 "스피커"라는 문자열값이 있는 장치 ID를 찾음


각 장치마다 두개 정도의 키가 있음

\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\...\Properties

\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\...\FxProperties


스피커 장치의 FxProperties 키의 값 중 Loudness Equalization 값을 찾아 변경



레지스트리 키

켜기

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\{...}\FxProperties]

"Loudness Equalization"=hex:0b,00,00,00,01,00,00,00,ff,ff,00,00

끄기

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\{...}\FxProperties]

"Loudness Equalization"=hex:0b,00,00,00,01,00,00,00,00,00,00,00



레지스트리 키 변경 커맨드 라인

명령 프롬프트 (관리자 권한으로 실행) >

@echo off

echo Windows Speaker Loudness Equalization On/Off

echo.


set /a les=0


set /p les=Turn on Loudness Equalization - Type Y/N: 


if %les%==0 set les=y

if "%les%"=="Y" set les=y

if "%les%"=="N" set les=n


sc stop Audiosrv

timeout 2


:: 레지스트리 접근 권한이 있는 경우

if %s%==y reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\{...}\FxProperties" /v "Loudness Equalization" /t REG_BINARY /d 0b00000001000000ffff0000 /f

if %s%==n reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\{...}\FxProperties" /v "Loudness Equalization" /t REG_BINARY /d 0b0000000100000000000000 /f


:: 레지스트리 접근 권한이 없는 경우 - reg 파일로 만들어서 추가

if %les%==y regedit /s C:\Windows_Speaker_LoudnessEqualization_Enable.reg

if %les%==n regedit /s C:\Windows_Speaker_LoudnessEqualization_Disable.reg


sc start Audiosrv

timeout 2


Windows_Speaker_LoudnessEqualization.cmd

윈도우 용 iTunes 서비스 재시작 스크립트


명령 프롬프트 (관리자 권한으로 실행) >

@echo off

sc stop "Apple Mobile Device Service"

sc stop "iPod Service"

sc stop "Bonjour Service"


timeout 2

cls


sc start "Apple Mobile Device Service"

sc start "iPod Service"

sc start "Bonjour Service"


timeout 2

cls


if exist "%CommonProgramFiles%\Apple\Mobile Device Support\SyncDiagnostics.exe" (

"%CommonProgramFiles%\Apple\Mobile Device Support\SyncDiagnostics.exe"

) else if exist "%CommonProgramFiles(x86)%\Apple\Mobile Device Support\SyncDiagnostics.exe" (

"%CommonProgramFiles(x86)%\Apple\Mobile Device Support\SyncDiagnostics.exe"

) else echo.


iTunesServicesRestart.cmd

Shutdown.cmd

 

@echo off

echo Shudown Schedule.

echo.


cd \

set /a h=0

set /a m=0

set /a st=0

set /a t=0


set /p h="Hour: "

set /p m="Minute: "

set /p st="0. Shutdwon, 1. Restart: "


if "%h%"=="" set /a h=0

if "%m%"=="" set /a m=0


set /a ht=%h%*3600

set /a mt=%m%*60

set /a t=%ht%+%mt%


cls

echo.


if %t%==0 shutdown /a


echo.


if %t%==0 echo  Schedule aborted. & echo. & echo.

if %t%==0 timeout 3

if %t%==0 exit


if %st%==0 shutdown /s /f /t %t%

if %st%==0 echo  System will shutdown in %h%h %m%m.

if %st%==1 shutdown /r /f /t %t%

if %st%==1 echo  System will restart in %h%h %m%m.


echo.

echo.


timeout 3


Shutdown.cmd

Delete Index Files.cmd

 

@echo off

echo Delete Index Files.

echo.


set /a drive=0

set /a exc=0

set /a includes=0

set /a includes_mac=0


vol c:

echo.

vol d:

echo.

vol e:

echo.

vol f:

echo.

vol g:

echo.


echo *Be careful if use on C:.

echo.


set /p drive="Drive Name: "

%drive%:

cd \

echo.

vol

echo.


set /p exc="Start? Y/N: "

echo.


if /i %exc%==n echo Aborting delete index files.

if /i %exc%==n timeout 3

if /i %exc%==n exit


set /p includes="Delete all Desktop.ini files too? Y/N: "

echo.

set /p includes_mac="Delete all macOS index files too? Y/N: "

echo.


del /s /q /f /a:r /a:s /a:h /a:a Thumbs.db

del /s /q /f /a:r /a:s /a:h /a:a *.$data.Zone.Identifier

del /s /q /f /a:r /a:s /a:h /a:a *.$data.Mac_Metadata

rmdir /s /q "System Volume Information"


if /i not %includes%==n del /s /q /f /a:r /a:s /a:h /a:a Desktop.ini


if /i not %includes_mac%==n del /s /q /f /a:r /a:s /a:h /a:a ._*

if /i not %includes_mac%==n del /s /q /f /a:r /a:s /a:h /a:a .com.*

if /i not %includes_mac%==n del /s /q /f /a:r /a:s /a:h /a:a .DS_Store

if /i not %includes_mac%==n rmdir /s /q .fseventsd

if /i not %includes_mac%==n rmdir /s /q .Spotlight-V100

if /i not %includes_mac%==n rmdir /s /q .TemporaryItems

if /i not %includes_mac%==n rmdir /s /q .Trashes


timeout 10


DeleteIndexFiles.cmd

블로그 이미지