Jump to content

Run command keeps returning wrong PID


Recommended Posts

Hello all,

I've written the code below which launches chrome in incognito mode and then proceeds to go to the autoit website.

From my understanding, the Run() command is also supposed to output the PID number related to the application that got launched from the Run command.

However when I run the below lines, it outputs a PID number that is different from the newly launched chrome browser's PID number, does anyone know why and possibly explain how I could retrieve the accurate PID number associated with the newly launched browser?

Global $iPid = Run(@ComSpec & ' /c start chrome.exe https://www.autoitscript.com/forum/ -incognito' ,"", "")
msgbox(0,"",$iPid)

Thank you,

Brian

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

×
×
  • Create New...