I´m developing an AIR extended desktop application that call some executables (.exe) and receive data from them via STDOUT.
problem: I must call a executable with admin privilegies and receive data from it.
Does anybody faced this problem?
I developed another C# Console application that uses manifest to run under admin privilegies and this console app call my desired executable. It opened, but it´s not sending data via STDOUT to AIR .
any suggestion will be very welcome.
If i call this Console app with manifest direct from AIR, it shows me a message telling that I need elevation to run it.
So I need to call it from AIR calling the "cmd.exe" (cmd /C RunAsAdmin.exe), then it show the window asking to run under admin privilegies and then the real application.
I ran into the extact same problem. When you launch a program using cmd.exe from AIR you are hooking the stdout for cmd.exe instead ofthe program launched by cmd.exe.
The only way I accomplished what you are trying to do is to write 2 separate C# apps. The first does not require admin rights and AIR will launch this app and listen for the stdout. The first app then launches the second app (which does require admin rights) and connects to it via a created named pipe. So the second app writes out to the created named pipe, the first app recieves the info and writes it to stdout, AIR then receives the info and you can finally get some sleep.
Does it work? YES!