Jump to content

Execute another application as Parent


b0x4it
 Share

Recommended Posts

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.

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...