# This series is aimed at 0 basic and non-industry students, introduce my commonly used, may be useful for many people lazy methods and ideas
This is the 1th article, deliberately speak very shallow, hands-on explanation, feel the IQ is insulted classmate can skip the corresponding paragraph
The general idea of this series
- You can't be too diligent.
- All mechanical duplication of work, as long as the ROI (ROI) cost-effective, consider handing over to the machine
- Costs include time costs and risk costs, and benefits include saving time to do more important things, getting better moods and personal growth
- It's just a matter of being lazy and not directly applying to an organization's need for automation.
- Don't do the same thing 3 times in the same way.
- 3 is a false finger
- What is "the same thing" may not be obvious at all
- Find the problem may not be able to locate the problem, positioning problems may not be able to solve the problem, but never "habit", Stay ANGRY(bad experience, not to people OH)
- Lazy! = Easy
- You have to run so hard to look back at people crawling.
- Laziness is also needed to learn.
- On their own blind, may even "this piece can be lazy" consciousness is not, once absorbed in other people's thinking, the next is much simpler
- Do not wait for people to teach, do not wait for the "training", will lazy are lazy people, you do not take the practice of the specific problems encountered in the initiative to ask, they do not bother you
- Split it! Split it! Split it!
- To be lazy is a little bit
Background
Do you feel that it is especially troublesome to start a lot of software after every job?
Browser, IDE, mail client, notes, Instant Messenger, other tools ...
The batch script will do you a favor, just take a few minutes.
Why not send the shortcut directly to the Startup folder?
1. Win10 the file folder, not necessarily remember to open its path or command, and the batch file is common to each system
2. Sometimes want to temporarily do not boot a thing, in the script to comment out than to start the folder and delete shortcuts, or software settings to facilitate
Premise
To set the file suffix name to be displayed first
# take Win10 English as an example, other versions of the system are similar in other languages
(The organization attaches importance to stability, individuals can chase new, new things for personal use are often better and safer.) In addition, as long as you can understand, software installation, choose the native language of the developer, avoid translation problems + may have more features, do not understand the best choice of general English)
Win10 such as
(PS: If you are a test classmate, here by the way to change the arrangement of the icon to "details", accustomed to this view to work more convenient point)
Remove the tick in front of "hide extensions for known types of files" (PS: Here you can drop the "Show All files, folders, and drives" point on the 2 line)
After all this time, I finally got to the chase.
Click the right mouse button, new text document (if you have notepad++, the corresponding menu name may be replaced with "notepad++ document")
(It is highly recommended to use notepad++ to completely replace inconvenient to character encoding, tab must be 8 space-length, no syntax highlighting, slag-like Windows Notepad)
Change the filename, remember that the. txt suffix must be changed to. bat is the batch script
The name is arbitrary, such as On.bat, as long as the suffix is. bat.
Pop-up prompts asking if you're sure you want to change the suffix name, sure.
(Wordy, a variety of warning boxes do not look at the random point of an option to turn off, can not understand the meaning of Google or Baidu search)
If you change the name, the file type is not changed batch file, then you must not see the above premise
Not set to display suffix, you think you changed to Xx.bat, actually the full name is Xx.bat.txt, so the type or text document
If you have notepad++, check the bat file right-click and select "Edit with notepad++"
If you don't have it, click "Edit" in the 2nd item of the menu and open it with Notepad.
(Do not double-click to run or right-to open, that is the execution batch script, because now there is nothing to write, only see the Black Command Prompt window flashed over)
Next will be typing on the line, the contents of the content like this, for a moment do not understand the first not urgent, the following step-by-step explanation
(English-language interface, notepad++ can be installed in Chinese)
First write the simplest experiment, do not understand the full hit, remember must be English punctuation
(in Chinese Input method, press the SHIFT key to switch between Chinese and English; Win10 is win + space switch different input method)
(The win key is the key that has Windows window logo on the keyboard, near the space key; "A key + a key" means to press and hold the keyboard one key, then press another, then let go, not to say to press the "+" key)
Save (shortcut key ctrl + S, get into the habit of writing down what you do)
(notepad++ a good thing is that if you don't turn off the tab, even if you quit the program or even power off, the writing will not be lost)
Go back to the folder you just ran, double-click Run saved. bat file, see Open a command Prompt window like this (later called the cmd window)
Then open the C-drive folder and 1 blank notepad
(Point to the top right corner of the fork or press any key to close the cmd window, any key refers to a keyboard on a random key, do not find "any" key in the world!)
That's easy, right? Then edit the file and replace the path with the one you want.
Open folder with Explorer "folder path name"
Open the program with the start "" Executable program (. exe file) pathname "
You want to open more than copy paste (shortcut CTRL + C and CTRL + V) above 2 commands, change the path on the line
After testing no problem, you can delete the last line of pause, so that after the execution of the direct exit CMD, do not have to press the keyboard every time
Remember double quotes, colons and the like in English notation, not the Chinese input method of full-width characters
Sometimes the software does not know where to install (such as the Chrome browser), or the installation directory has n. exe files, do not know which one (such as QQ)
You can find its shortcut, right-click Property, which has a copy
The Office family Setup is basically nowhere to be found, and you can open its file location in the Start menu
Specify the path to the shortcut inside.
If you are not using WIN10 and office2016, the path and folder contents may be different, the method is similar
The last step is to set the written batch script to boot automatically.
First of all, create a shortcut.
Then you'll cut the shortcut (CTRL + X) paste (Ctrl + V) to the Startup folder
In a system like Win7 you can find the Startup folder directly from the Start menu, but the win10 is a bit around:
Press win + R to open the Run window, enter Shell:startup, return or point OK
Remember that the colon is the English half-width symbol
will be able to open the folder, cut the shortcut to paste the past, the boot will not use their own point that
PS: The above Startup folder is only for the current user, if you want all users to boot those things, command for Shell:common startup
However, Windows Desktop Edition usually has 1 users only:)
If you do not want to start a thing temporarily, but in the future may be, do not delete the line, comment off the good
is to add REM at the beginning of the command you don't want to execute
Between REM and command remember spaces
(with notepad++ or other text editor with syntax highlighting, see Green is right)
When you want it to boot, delete the previous comment symbol.
Share (I hate to say tutorial) end, here is something
Because this article more than 20 words, I know a lot of people are too lazy to read the 1th line
If you actually see this place (rather than just pulling to the bottom), maybe you're also a lazy person: P
I am very lazy, actually do not like to write this kind of thing, have that time can be able to do too much
Writing a blog is mainly for the sake of forgetting, generally will skip all already very familiar things
This estimate will be the only one in this style, because do not want to repeat with different people to explain the red, blue, gray words in the situation
Really, don't laugh ...
If you have really tried it out after reading it, you might be able to suggest things like
"What is the @echo off in line 1th in the first example?" Must be written at the beginning of the file? ”
"What's the difference between those empty lines in the command? ”
"Must the file path be surrounded by" "? If not, why do you write this? ”
Why is there nothing in the first "after start"? What's the use? ”
"Pause must be put in the end?" ”
"What is the difference between the 2 annotation symbols?" ”
"Comments can only be commented on the entire line?" ”
"How do you know what the orders are for?" ”
Questions like that you should be interested to see this introductory article
If you want a simple answer, the most responsible statement is:
Search under, then search under, and then try
This sentence applies to many occasions, not just batch processing (I am not interested in it) or playing computer
"Learn to be lazy" 00. Start the software with a batch script