b0x4it Posted December 21, 2013 Share Posted December 21, 2013 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 More sharing options...
Gianni Posted December 22, 2013 Share Posted December 22, 2013 maybe RunAs() ? Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Developers Jos Posted December 22, 2013 Developers Share Posted December 22, 2013 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 More sharing options...
b0x4it Posted December 22, 2013 Author Share Posted December 22, 2013 (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 December 22, 2013 by b0x4it Link to comment Share on other sites More sharing options...
b0x4it Posted December 23, 2013 Author Share Posted December 23, 2013 Any reply?! Link to comment Share on other sites More sharing options...
b0x4it Posted December 23, 2013 Author Share Posted December 23, 2013 maybe RunAs() ? In the manual I can't find anything in this regard for RunAs()! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now