查詢開機啟動項參考:
親測還有一些啟動程式沒有找出來
批處理程式如下:
@echo off
ver | find "10.0." > nul && goto win10
:otheros
goto next
:win10
%systemdrive%
rem 當前使用者的啟動資料夾
rem note:administrator是當前使用者的使用者名稱
for /f %%i in ('dir /b') do (echo %%i)
rem 所有使用者的啟動資料夾
cd c:\programdata\microsoft\windows\start menu\programs\startup
for /f %%i in ('dir /b') do (echo %%i)
rem load註冊鍵
reg query hkcu\software\microsoft\windowsnt\currentversion\windows\load>nul 2>nul
if %errorlevel%==0 (
for /f "skip=2 tokens=3" %%i in ('reg query hkcu\software\microsoft\windowsnt\currentversion\windows\load') do (echo %%i)
) goto next
:next
rem userinit註冊鍵
reg query hklm\software\microsoft\windowsnt\currentversion\winlogon\userinit>nul 2>nul
if %errorlevel%==0 (
for /f "skip=2 tokens=3" %%i in ('reg query hklm\software\microsoft\windowsnt\currentversion\winlogon\userinit') do (echo %%i)
) rem explorer\run註冊鍵
reg query hkcu\software\microsoft\windows\currentversion\policies\explorer\run>nul 2>nul
if %errorlevel%==0 (
for /f "skip=2 tokens=3" %%i in ('reg query hkcu\software\microsoft\windows\currentversion\policies\explorer\run') do (echo %%i)
) reg query hklm\software\microsoft\windows\currentversion\policies\explorer\run>nul 2>nul
if %errorlevel%==0 (
for /f "skip=2 tokens=3" %%i in ('reg query hklm\software\microsoft\windows\currentversion\policies\explorer\run') do (echo %%i)
) rem runservicesonce註冊鍵
reg query hkcu\software\microsoft\windows\currentversion\runservicesonce>nul 2>nul
if %errorlevel%==0 (
for /f "skip=2 tokens=3" %%i in ('reg query hkcu\software\microsoft\windows\currentversion\runservicesonce') do (echo %%i)
) reg query hklm\software\microsoft\windows\currentversion\runservicesonce>nul 2>nul
if %errorlevel%==0 (
for /f "skip=2 tokens=3" %%i in ('reg query hklm\software\microsoft\windows\currentversion\runservicesonce') do (echo %%i)
) rem runservices註冊鍵
reg query hkcu\software\microsoft\windows\currentversion\runservices>nul 2>nul
if %errorlevel%==0 (
for /f "skip=2 tokens=3" %%i in ('reg query hkcu\software\microsoft\windows\currentversion\runservices') do (echo %%i)
) reg query hklm\software\microsoft\windows\currentversion\runservices>nul 2>nul
if %errorlevel%==0 (
rem for /f "skip=2 tokens=3" %%i in ('reg query hklm\software\microsoft\windows\currentversion\runservices>nul 2>nul') do (echo %%i)
) rem runonce\setup註冊鍵
reg query hkcu\software\microsoft\windows\currentversion\runonce\setup>nul 2>nul
if %errorlevel%==0 (
for /f "skip=2 tokens=3" %%i in ('reg query hkcu\software\microsoft\windows\currentversion\runonce\setup') do (echo %%i)
) reg query hklm\software\microsoft\windows\currentversion\runonce\setup>nul 2>nul
if %errorlevel%==0 (
rem for /f "skip=2 tokens=3" %%i in ('reg query hklm\software\microsoft\windows\currentversion\runonce\setup') do (echo %%i)
) rem runonce註冊鍵
reg query hklm\software\microsoft\windows\currentversion\runonce和hkcu\software\microsoft\windows\currentversion\runonce>nul 2>nul
if %errorlevel%==0 (
for /f "skip=2 tokens=3" %%i in ('reg query hklm\software\microsoft\windows\currentversion\runonce和hkcu\software\microsoft\windows\currentversion\runonce') do (echo %%i)
) rem run註冊鍵
reg query hklm\software\microsoft\windows\currentversion\run>nul 2>nul
if %errorlevel%==0 (
for /f "skip=2 tokens=3" %%i in ('reg query hklm\software\microsoft\windows\currentversion\run') do (echo %%i)
) reg query hkcu\software\microsoft\windows\currentversion\run>nul 2>nul
if %errorlevel%==0 (
for /f "skip=2 tokens=3" %%i in ('reg query hkcu\software\microsoft\windows\currentversion\run') do (echo %%i)
) echo 執行完畢
pause>nul
windows server 開機自動啟動項
在windows server系統中,系統啟動後,如果不登陸,不會啟動登錄檔中的自動啟動項 win10可以不登陸自動啟動 可以通過設定開機後自動登陸解決 開始選單搜尋框輸入 netplwiz 按回車 或 win r 組合鍵開啟 執行 框內輸入 netplwiz 或 執行 框內輸入 control u...
Linux設定開機啟動項
第一種方式 ln s 建立啟動軟連線 在linux中有7種執行級別 可在 etc inittab檔案設定 每種執行級別分別對應著 etc rc.d rc 0 6 d這7個目錄 tips etc rc 0 6 d其實是 etc rc.d rc 0 6 d的軟連線,主要是為了保持和unix的相容性才做此...
centos開機啟動項管理
開機啟動項管理,centos6使用的是chkconfig,centos7使用的是systemctl 1.開機啟動服務查詢 chkconfig list 2.刪除開機啟動項 chkconfig del 服務名 3.新增開機啟動項 服務必須要在 etc init.d目錄下能查詢到,chkconfig a...