Basic usage of Inno Setup

Source: Internet
Author: User

1. open Inno Setup, select "Create a new script file using the script wizard", and click "OK"
2. click "Next"
3. enter the Program information of the application, and click "Next"
4. set the application directory and click "Next"
5. select your executable file and add the following file to other Application Files:
(1) cms07 Description: database backup file
(2)osql.exe description: this file is available in the SQL bin directory
(3366restore.txt file, which contains the following content:
use master
If exists (select * From sysdevices where name = 'cms07 ')
exec sp_dropdevice 'cms07'
else
exec sp_addumpdevice 'disk', 'cms07', 'c: /program files/Microsoft SQL Server/MSSQL/data/cms07.mdf '
Restore database cms07
from disk = 'C: /program files/MyApp/cms07 '
with replace
Note: you must write your own database name
(4) Restore. BAT file, which contains:
osql-e-s-I restore.txt

6. Always click "Next" (some modifications can be made in the middle as needed), and finally click "finish". A dialog box is displayed, prompting "Do You Want To compile the new script now? ", Select" no "and add it to the first line of [run]Code:
Filename: "{app}/restore. Bat" // release the database during installation

7. Compile and run the program to package it into an installer.

 

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.