Installshieldx installation and production note (installation completed for the instance)

Source: Internet
Author: User

Author: fbysss
Blog: blog.csdn.net/fbysss
Disclaimer: This article is original from fbysss. for reprinting or reference, please specify the reference address.
We can see that many software may have some options after installation, such as "view readme" and "run program". How does this happen?
Keywords: onmoved, sdfinish
1. The installshieldx script has an onmoved event. This event is triggered after the copy of the file to be installed is complete;
2. sdfinish is a standard dialog box function. Its prototype is sdfinish (sztitle, szmsg1, szmsg2, szopt1, szopt2, bvopt1, and bvopt2). It can be found from the parameters that only up to two options are provided here.

The instance code is as follows:
Function onmoved ()
String sztitle;
String szmsg1, szmsg2, szopt1, szopt2;
Bool bvopt1, bvopt2;
String szapplicationpath, szapplicationline line, szcmdline;
Begin
If (maintenance) then return 0; endif; // if it is not the installation status, for example, when modifying/uninstalling the status, it is not executed.
Sztitle = "Installation Complete"; // the title of the dialog box
Szmsg1 = "% P installation completed./N" +
"Select the following options as needed."; // % P indicates the software product name.
// If you want to set the product name here separately, use the following two statements:
// Szproductname = "XX software ";
// Sdproductname (szproductname );

Szmsg2 = "Click 'complete' to complete % P installation .";

Szopt1 = "read the README file"; // if this field is empty, only one option is available.
Szopt2 = "running program ";
Sdfinish (sztitle, szmsg1, szmsg2, szopt1, szopt2, bvopt1, bvopt2 );
If (bvopt1) then

Launchapp ('notepad.exe ', targetdir ^ "// readme.txt"); // launchapp is used to run an external program
Endif;

If (bvopt2) then
Launchapp (targetdir ^ "// app.exe ","");
Endif;

End;

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.