Summary of Windows batch processing 1

Source: Internet
Author: User

 

You need to write a batch processing file for batch execution of VC and installshiel projects, instead of opening the IDE interface for compilation every time.

 

The following is a summary:

 

1: Batch Commands used

@

Echo off

Goto

Pause

If else

And so on

 

Nested if else statements

Solution:

If-else must be in the same row. If the statement is not long and must be written by a branch, connect the else statement with ^; otherwise, an error is returned !, At the same time, after the if condition is met

The statement is enclosed in parentheses and the syntax is

If condition (action that meets the condition) else (action that does not meet the condition)

 

2: Use of Environment Variables

Errorlevel can be used in if-Equal to or greaterIf the value is specified, the execution is performed.

E. g:

If errorlevel 0...

 

If the error code valueGreater than or equalWhen the value is 0, an operation is executed;

When using if % errorlevel % = 0 ...... The meaning of the sentence is:

If the error code value is 0, an operation is performed. Because of the difference between the two sentence types

The order of the error code statements is from large to small.

 

3: In addition, the execution paths of vc6 and installshiled should be added to the system environment variable path.

 

4: VC command line compilation:

Msdev D:/path/sample. DSW/make "Sample-Win32 release"/rebuild/out C:/logpile. txt

For details, see http://msdn.microsoft.com/en-us/library/aa699274 (vs.60). aspx

 

 

5: InstallShield command line compiling C:/program files/InstallShield/2009/system/iscmdbld.exe "-P" D:/path/sample. ism "-B" D:/installations_2009/sample/Media/release"

For details about the parameters, see the iscmdbld.exe topic.

 

 

 

Related Article

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.