Command for listing all startup items by batch processing

Source: Internet
Author: User

Below is the code written by JM, which may be useful to you !~

Copy codeThe Code is as follows: @ echo off
: Considering that not all programs are installed on the system disk, you must use them! Str :~ -1! To intercept the drive letter
: If the path contains N Chinese characters, the last N characters of the path are not displayed (one Chinese Character occupies two characters)
: Code by jm 2006-7-27
Setlocal enabledelayedexpansion
Echo.
Echo boot self-start programs include:
Echo.
For/f "skip = 4 tokens = 1 * delims =:" % I in ('reg query HKLM \ Software \ Microsoft \ Windows \ CurrentVersion \ run') do (
Set str = % I
Set var = % j
Set "var =! Var: "=! "
If not "! Var :~ -1! "=" = "Echo! Str :~ -1! :! Var!
)
Pause> nul

Copy codeThe Code is as follows: @ ECHO OFF
Set rq = REG QUERY
Set cu = HKEY_CURRENT_USER
Set lm = HKEY_LOCAL_MACHINE
Set fs = FINDSTR/V/B "! HKEY _ "^ | FINDSTR "."
Set ws = \ Software \ Microsoft \ Windows \ CurrentVersion \
Set wt = \ Software \ Microsoft \ Windows NT \ CurrentVersion \
Set ck = \ SYSTEM \ CurrentControlSet \ Control \ Session Manager
Set rt = LoadUserinitWindowsWinlogonShellRunOnceExPolicies \ Explorer \ RunBootExecute
Set rp = ECHO -------------------------------------------------------------------------------

% RP % & ECHO % ALLUSERSPROFILE % ^ & % USERNAME % \ Start Menu \ Program \ Start
FOR % I IN (ALLUSERSPROFILE; USERPROFILE) do call dir/B/S "% I % \ Start Menu \ Program \ Start"
% RP %

FOR/F "tokens = 1-8 delims =:" % a in ('findstr/B ":" "% ~ Nx0 "') DO (
CALL: REGQUERY 1% % A % B % C % D % E % F % G "> NUL"
)
SET/A 1/% ~ 1 2> NUL & GOTO: EOF
SET/p CONU = export as text document? (Y/N ):
ECHO % CONU % | FIND/I "N" 1> NUL 2 <& 1 & GOTO: EOF
CALL % ~ Nx0 1> % ~ N02.16.txt
ECHO file list: % ~ Dpn02.16.txt
PAUSE> NUL & "% ~ Dpn02.16.txt"
GOTO: EOF
: Cu wt 12 7 V 0 4
: Lm wt 19 8 V 4 8
: Lm wt 19 8 V 27 5
: Cu ws 32 3 S 0 0
: Lm ws 32 3 S 0 0
: Cu ws 32 7 S 0 0
: Lm ws 32 7 S 0 0
: Cu ws 32 9 S 0 0
: Lm ws 32 9 S 0 0
: Cu ws 41 21 S 0 0
: Lm ws 41 21 S 0 0
: Lm ck 0 0 V 62 11
: REGQUERY
Call set pr = % ~ 2% % ~ 3% % rt :~ % ~ 4, % ~ 5% % & call set pz = % rt :~ % ~ 7, % ~ 8% %
ECHO [% PR %] % ~ 9 & % RQ % "% PR %"/% 6% PZ % 2> NUL | % FS % ~ 9 & % RP % & SET/A 1/% 1 2> NUL & CALL % 0 0% 2% 3% 4% 5% 6% 8
GOTO: EOF

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.