Hi, I am trying to kill a process for the current logged user only. However I noticed that the ProcessClose command is trying to shut down all instances. I have tried the ProcessClose command with the exe name and the PID number and I get the same results. Here is my code so far. Thank you for your help.
Dim $PID1, $PID2
; Hide AutoIt tray icon
AutoItSetOption("TrayIconHide", 1)
; Launch Act along with Outlook Service
ShellExecute("D:\Program Files\ACT\Act for Windows\ActSage.exe", "-nosplash")
ShellExecute("D:\Program Files\ACT\Act for Windows\Act.Outlook.Service.exe", @SW_HIDE)
; Kill Act.Outlook.Service.exe when ActSage.exe is closed
$PID1 = ProcessExists("ActSage.exe") ; Will return the PID or 0 if the process isn't found.
$PID2 = ProcessExists("Act.Outlook.Service.exe") ; Will return the PID or 0 if the process isn't found.
If $PID2 Then ProcessWaitClose($PID1)
ProcessClose($PID2)
Exit
Regards,
Jonathan