As3 supports two background installation (Silent Installation) Methods

Source: Internet
Author: User
First (. Air)

Package the project in. Air format. Use the command line installation format in cmd: Adobe AIR application installer.exe-silent-logtostdout-eulaaccepted-location path/XXXXX. Air

The silent parameter is Silent Installation, that is, the installation dialog box is not displayed, and the installation is completed in a step.
The logtostdout parameter is not required for actual use. It is used to send the information during installation to the standard output terminal, that is, the command line.
In the eulaaccepted parameter, EULA is the end user licese agreement, that is, consent to the user agreement. I absolutely agree to it, but no changes have been made even if this parameter is not added.
The location parameter and the path specified later are of course the installation path.
XXXXXXXX. Air is the installation file of your air program.

You can also see some methods to silently Uninstall. air on the Internet. Run the-uninstall command as follows:

-Uninstall (I tried it and it does not work. I don't know the specific parameters and usage)

In cmd, "Adobe AIR application installer.exe"-uninstall appinstaller. Air XXXXX
There should be two parameters after uninstall, the first may be the air installation file, and the second may not know what to write. If the parameter is specified, the not enough arguments will be reported. In this way, the write will indeed execute uninstall, because an error occurs when "Uninstall" is reported"

In Windows 64-bit system, Adobe AIR application installer.exe is in the directory c: \ Program Files (x86) \ common files \ Adobe
Air \ versions \ 1.0

Code:

Var file: file = new file (file. applicationdirectory. nativepath + "/Setup/Adobe AIR application installer.exe"); var na: nativeprocessstartupinfo = new nativeprocessstartupinfo (); var process: nativeprocess = new nativeprocess();na.exe cutable = file; var V: vector. <string> = new vector. <string> (); // parameter required by the External Application v. push ("-silent"); V. push ("-logtostdout"); V. push ("-eulaaccepted"); V. push ("-location"); V. push ("C:/Program Files"); V. push ("D:/program files/setup. air "); NA. arguments = V; process. start (NA); process. addeventlistener (nativeprocessexitevent. exit, _ installcompletehandler); process. closeinput ();

Type 2 (.exe)

Package the project into .exe format. The command line installation format in cmd is as follows: xxxxx.exe-silent-location path/xxxxxx(if xxx.exe/Q is input, you can see the complete parameter requirements of this command)

Xxxx.exe is your Installer

-Silent is Silent Installation

-Location and subsequent Parameters specify the installation path

Code:

Var file: file = new file ("D:/program files/setup.exe"); var na: nativeprocessstartupinfo = new nativeprocessstartupinfo (); var process: nativeprocess = new nativeprocess(registry.na.exe cutable = File; vaR V: vector. <string> = new vector. <string> (); // parameter required by the External Application v. push ("-silent"); V. push ("-location"); V. push ("C:/Program Files"); NA. arguments = V; process. start (NA); process. addeventlistener (nativeprocessexitevent. exit, _ installcompletehandler); // listens whether the installation process is complete. closeinput ();

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.