Elegantly build a development environment in the room

Source: Internet
Author: User
Tags cmd copy

The school room is usually equipped with hard disk restore, every time to get the environment this nest is definitely not the magnetic ah.

room installed is broken IE7 ah, what OJ are not on Ah!

. in,.ans,.out file doesn't have a file association, open your trouble!

PDF can not see Ah!

Notepad No line number!

Computer class Teacher also take e-learning control computer AH. No one is going to knock the code out well. Kill the tool every time to end the process good trouble.

the right way to go to work: Usb3.0+cmd

This article will use the modular design method to write batch files, in 2s to complete the following work:

• Modify the resolution

• Kill the teacher control process

• Set Palemoon portable as the default browser

• Set file associations for. ans,.in,.out files

• Clean desktop icons and replace them with your favorite software

• Open QQ chat version, Dev C + + Installer

preparatory work

1. U disk (best support USB3.0)

2. Software/runtime library required for installation/copying

3. Shortcuts that need to be placed on the desktop (point to the USB flash drive or software default installation directory)

4. Portable version of the software

5. Necessary command-line software: ntsd,setres

USB Stick Directory

├cmd//the batch file where the call is stored

├library//Runtime Library, registry

├link//the icon that needs to be placed on the desktop

├bin//Portable version of software and command-line tools

└installer//Software Installation program

└main//installation program that requires automatic replication

Program Architecture

GETSTARTED.CMD//is responsible for invoking the modular approach

├setres.cmd//Modifying the resolution

├killer.cmd//kills teacher control into

├cleaner.cmd//Cleaning Desktop icons

├library.cmd//Modifying the registry, copying the runtime

├copy.cmd//copy common Software installation package

└installer.cmd//open a software installation package that has been copied to the hard drive

Program Implementation

Getstarted.cmd Main Program

Start "" Cmd\setres.cmd

Start "" Killer.cmd

Start "" Cmd\cleaner.cmd

Start "" Cmd\library.cmd

Start "" Cmd\binset.cmd

Call Cmd\copy.cmd

Call Cmd\installer.cmd

Setres.cmd Modifying the resolution

Start "" ". \bin\setres.exe "h1366 v768

Exit

Killer.cmd End Control Process

Copy Bin\ntsd.exe%windir%\system32\

Ntsd-c Q-PN StudentMain.exe

Exit

Cleaner.cmd Cleaning Desktop icons

del/f/a/q "C:\Documents and settings\administrator\ desktop \*"

del/f/a/q "C:\Documents and Settings\All Users\ Desktop \*"

Exit

Library.cmd Modify open mode, default browser, install Zlib

Start "ZLIB" ". \library\install-zlib.cmd "

For/r. \library\reg%%a in (*. *) do Reg import%%a

Exit

Copy.cmd Copying the Installer

xcopy ". \link "" C:\Documents and settings\administrator\ desktop \ "

xcopy ". \installer\main "" C:\Documents and settings\administrator\ desktop \installer\ "

xcopy ". \bin\shadowsocks "" D:\Shadowsocks\ "

Installer.cmd Running the Setup program

Start "" "C:\Documents and settings\administrator\ desktop \installer\dev-cpp 5.11 tdm-gcc 4.9.2 Setup.exe"

Start "" "C:\Documents and settings\administrator\ desktop \installer\qq7.9light.exe"

Program notes

Getstarted.cmd:

The start command runs the program in a separate window and runs the next command without having to wait for the program to finish running. When the batch is called, the batch to which it is called is added with exit at the end to make the command-line window disappear automatically. The first parameter of the Start command represents a new window caption, and the second parameter represents the program path.

This puts setres.cmd on top of the call because it takes the longest time.

Cleaner.cmd needs to be called before copy.cmd, otherwise it will be deleted with the copy.cmd copy shortcut.

The call command can invoke other batch programs within the current process. In order for Installer.cmd to run the Setup program properly, you must call Copy.cmd,installer.cmd in turn using the Invoke command.

Library.cmd:

The reg import command can be used to import registry files,

For/r. \library\reg%%a in (*. *) do Reg import%%a means import: All registry files under \library\reg. Here my registry file is used to delete icons such as Desktop Network Places, add file associations, and modify the default browser.

Registry changes please Baidu. You can also refer to the Windows file association, open with list to modify the registry Raiders .

Killer.cmd:

NTSD is a debug level process terminator that is used to kill more than enough teachers to control the process.

Setres.cmd

Setres.exe can modify the resolution.

Elegantly build a development environment in the room

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.