Đóng gói chương trình bằng Smart Install Maker
Ví dụ Bạn có 3 file Book1, Book2, Book3 nằm ở D:\ và Bạn muốn tạo một file setupbook.exe (file exe) nằm ở D:\ sao cho khi chạy file này, nó sẽ tạo một thư mục C:\Program Files\DiendanExcel\”ten” và chứa 3 file trên (các file này cũng có thể đặt vào vị trí “đích” khác tùy ý lúc Add file). Bạn hãy làm các bước sau:
- Khởi động Smart Install Maker
- Vào mục Installr sau đó vào các trang:
1. Trang General, Bạn điền thứ tự các thông tin: tên (ten Ban), phiên bản, công ty…, tiêu đề (khi chạy file exe), tên bản quyền, đường dẫn sẽ tạo ra file exe (D:\setupbook.exe), mức độ nén dữ liệu và giới hạn file (không quan tâm).
2. Trang Files Bạn Bấm vào dấu cộng (add) để chọn từng file Book1, Book2, Book3 đã có. Tại hộp thoại Add Item Bạn chọn file nguồn, đích của từng file này khi cài đặt, chép đè hay thay mới (nếu file đó đã tồn tại), có xóa bỏ khi chạy Uninstallr không.
Chú ý: Chương trình có qui định về cách viết (Bạn xem bảng sau), Bạn không phải viết mà chọn từ danh sách của biểu tượng thư mục có mũi tên màu xanh.
Constants:
%ProductName%
Title of your application
%ProductVersion%
Version of your application
%CompanyName%
Name of your company, team or organization
Variables:
%UserName%
Name of the user
%ComputerName%
Name of the user company
%InstallPath%
Directory where application is to be installed
%Language%
Selected language
%CurrentDir%
Current directory
Variables paths:
%ProgramFiles%
C:\Program Files
%WindowsDir%
C:\Windows
%SystemDir%
C:\Windows\System32
%FontDir%
C:\Windows\Fonts
%CommonFiles%
C:\Program Files\Common Files
%UserProfile%
C:\Documents and Settings\%UserName%
%TempDir%
C:\Documents and Settings\%UserName%\Local Settings\Temp
%SendTo%
C:\Documents and Settings\%UserName%\SendTo
%QuickLaunch%
C:\Documents and Settings\%UserName%\Application Data\Microsoft\Internet Explorer\Quick Launch
%MyDocuments%
C:\Documents and Settings\%UserName%\My Documents
%Desktop%
C:\Documents and Settings\%UserName%\Desktop
%ProgramsDir%
C:\Documents and Settings\%UserName%\Start Menu\Programs
%StartMenu%
C:\Documents and Settings\%UserName%\Start Menu
%Favorites%
C:\Documents and Settings\%UserName%\Favorites
%StartUp%
C:\Documents and Settings\%UserName%\Start Menu\Programs\Startup
%Templates%
C:\Documents and Settings\%UserName%\Templates
%AppData%
C:\Documents and Settings\%UserName%\Application Data
%CommonDocuments%
C:\Documents and Settings\All Users\Documents
%CommonDesktop%
C:\Documents and Settings\All Users\Desktop
%CommonProgramsDir%
C:\Documents and Settings\All Users\Start Menu\Programs
%CommonStartMenu%
C:\Documents and Settings\All Users\Start Menu
%CommonFavorites%
C:\Documents and Settings\All Users\Favorites
%CommonStartUp%
C:\Documents and Settings\All Users\Start Menu\Programs\Startup
%CommonTemplates%
C:\Documents and Settings\All Users\Templates
%CommonAppData%
C:\Documents and Settings\All Users\Application Data
%SystemDrive%
C:
Short variables paths:
%ShortProgramFiles%
C:\Progra~1
%ShortWindowsDir%
C:\Windows
%ShortSystemDir%
C:\Windows\System32
%ShortFontDir%
C:\Windows\Fonts
%ShortCommonFiles%
C:\Progra~1\Common~1
%ShortUserProfile%
C:\Docume~1\%UserName%
%ShortTempDir%
C:\Docume~1\%UserName%\LocalS~1\Temp
%ShortSendTo%
C:\Docume~1\%UserName%\SendTo
%ShortQuickLaunch%
C:\Docume~1\%UserName%\Applic~1\Micros~1\Intern~1\QuickL~1
%ShortMyDocuments%
C:\Docume~1\%UserName%\Mydocu~1
%ShortDesktop%
C:\Docume~1\%UserName%\Desktop
%ShortProgramsDir%
C:\Docume~1\%UserName%\StartM~1\Programs
%ShortStartMenu%
C:\Docume~1\%UserName%\StartM~1
%ShortFavorites%
C:\Docume~1\%UserName%\Favori~1
%ShortStartUp%
C:\Docume~1\%UserName%\StartM~1\Programs\Startup
%ShortTemplates%
C:\Docume~1\%UserName%\Templa~1
%ShortAppData%
C:\Docume~1\%UserName%\Applic~1
%ShortCommonDocuments%
C:\Docume~1\AllUsers\Docume~1
%ShortCommonDesktop%
C:\Docume~1\AllUsers\Desktop
%ShortCommonProgramsDir%
C:\Docume~1\AllUsers\StartM~1\Programs
%ShortCommonStartMenu%
C:\Docume~1\AllUsers\StartM~1
%ShortCommonFavorites%
C:\Docume~1\AllUsers\Favori~1
%ShortCommonStartUp%
C:\Docume~1\AllUsers\StartM~1\Programs\Startup
%ShortCommonTemplates%
C:\Docume~1\AllUsers\Templa~1
%ShortCommonAppData%
C:\Docume~1\AllUsers\Applic~1
%ShortCurrentDir%
C:\Setup
%ShortInstallPath%
C:\Progra~1\MyComp~1\MyAppl~1
Ví dụ:
a. "%ProgramFiles%\%CompanyName%\%ProductName%" -> "C:\Program Files\Company\NewProduct"
b. "%InstallPath%\myapp.exe" -> "C:\Program Files\Company\NewProduct\myapp.exe"
3. Trang Requirements Page: Chọn hệ điều hành tương thích.
4. Trang Dialogs chọn các mặt định khi chạy chương trình, Password khi chạy file exe….. chú ý địa chỉ mặc định của thư mục sẽ tạo ra khi cài đặt file exe (ở đây là C:\Program Files\DiendanExcel\”tên”).
5. Trang Interface chọn logo, ngôn ngữ …, để mặt định cũng được.
6. Trang Sortcuts tạo các Sortcuts khi cài đặt (nếu muốn)
Ngoài ra còn nhiều tính năng khác như tạo key (registry), file ini … dùng cho các lập trình viên chuyên nghiệp.
Sau khi thực hiện xong các bước trên, Bạn có thể tạo file exe bằng cách vào biểu tượng Run Installer (có hình nút Play) để thưởng thức thành quả của mình.
Chú ý: Bạn có trể lưu lại file này để sử dụng cho lần sau.
Trên đây là một số thao tác cơ bản mà tôi tự tìm hiểu, mong các Pro nghiên cứu để khai thác thêm các tính năng khác và chia sẻ.