cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not applicable

Executing IA from Another Application

Recently, I created an update application that will download updated versions of an application, if one exists, and attempts to execute it. I was planning on having the update application download an IA project that will overlay the new files over the old files silently (hence, both the update application and the application being updated will both be terminated and I can update both)

The issue I am having is that anytime I attempt to run the new IA installer (in this case Install.exe) I keep getting the following error:
Error starting application: Cannot run program "install.exe": CreateProcess error=740, The requested operation requires elevation

This error happens when I run the following line of code:
Runtime.getRuntime().exec(INSTALL_FILE);
Where INSTALL_FILE is just a constant for install.exe.

Has anyone seen this error before and/or have any suggestions? I am running this under Windows 7 and I am starting to this it is a security issue. When I attempt to run it manually I get "User Account Control" dialog asking if I want to allow a program from an unknown publisher to make changes to my computer.

Thanks!
Labels (1)
0 Kudos
(3) Replies
Not applicable

I have managed to get the application to start with the following code change:
String[] cmd = new String[]{"cmd.exe", "/c", INSTALL_FILE};
Runtime.getRuntime().exec(cmd);

Again, INSTALL_FILE is just a constant for "install.exe".

Unfortunately, it still brings up the "User Account Control" dialog even though this was suppose to update files silently.

I am guessing that we will somehow have to sign the install.exe file so that it recognize that the file is from a friendly source but I am not sure how to do it yet.

Note: This will only happen in Windows 7 and Vista as of today.
0 Kudos
pv7721
Level 20

Most likely the IA installer has been defined in such a way that it asks for elevated privileges, so I'm afraid you might not be able to do anything about it, if you don't have control over it.
0 Kudos
Not applicable

Thanks Vlad, I believe you are correct. For now I am just going to let it prompt the user and I may have to add a screen asking the user to select 'yes' when the the permissions dialog appears. Hopefully, our QA team is fine with that too.

-Kevin
0 Kudos