tags:

views:

110

answers:

1

Hello friends,

I want to install .air file using my java code.I am currently using following code to run the air installation:

Runtime rt=Runtime.getRuntime();
rt.exec("cmd /c start call secureId.air");
rt.exit(0);

Is there any way to install .air as a back ground without cmd prompt? or Is there any other way to install this air application.

please help me. Thanks in advance

A: 

You can use the HIDE option for cmd.I mean use rt.exec("cmd HIDE /c start call secureId.air"); to hide cmd and after your application installs you can close cmd by calling the destroy() method of your process. To wait for the application to install use waitFor() method and then close cmd.

Runtime rt=Runtime.getRuntime();

Process look=rt.exec("cmd HIDE /c start call secureId.air");

look.waitFor();

look.destroy();

rt.exit(0);

Hope it works

Avinash Singh