Sign in to follow this  
Followers 0
b0x4it

Execute another application as Parent

6 posts in this topic

Is there any way to run another exe/application as Parent?

When I use run/shellexecute commands in Autoit, the executed application runs as a child to my code that is running it. This cause lots of issues for examples for firewall applications as some of them just detects parent application and not child processes.

Share this post


Link to post
Share on other sites



maybe RunAs() ?


small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites

Is there any way to run another exe/application as Parent?

When I use run/shellexecute commands in Autoit, the executed application runs as a child to my code that is running it. This cause lots of issues for examples for firewall applications as some of them just detects parent application and not child processes.

Give us a good example were you really would need this for other than hiding something?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Give us a good example were you really would need this for other than hiding something?

Jos

 

Sure. I am using a free firewall called Privatefirewall (http://www.privacyware.com/personal_firewall.html). This firewall detects parent applications. So it means that parent application need to be connected to the network if I want the childs to have access to the internet. But the parent application does not need to have access to internet. Moreove, if I give access to the parent application which is an Autoit exe (EXE1) file that I wrote to manage my hotkeys, then thiws firewall gives access to all of the childs which again causing problems as some of the childs should not be connected to internet. Please let me know how I can do this.

One solution I can think of is having another Autoit exe file (EXE2) in between. This means that my EXE1 calls EXE2 with a command that is the path of the application that needs to be launched. EXE2 will execute the application and kill itself. This way EXE1 and the running applications they both become parents. This works, but I was looking for faster and shorter solution.

EDIT: I think I just found another solution that is using _WinAPI_CreateProcess and specifying DETACHED_PROCESS flag. But still I don't have any example to do this.

Edited by b0x4it

Share this post


Link to post
Share on other sites

Any reply?!

Share this post


Link to post
Share on other sites

maybe RunAs() ?

 

In the manual I can't find anything in this regard for RunAs()!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0