Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Restart Chrome after update and restore all tabs

Hey guys

I'm trying to figure out the way I can set up out Chrome update package so after the update is done Chrome will be restarted and reopened again with restored tabs.

To achive this I added aditional commands to existing package, 1st taskkill /im chrome.exe and 2nd "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --restore-last-session

Everything works fine, but after execution of the last command, deployment process keeps running until the set time is running out, or until I abort it. After that Chrome will close itself. Can anyone point out where I am making a mistake? Thanks a lot.

1

Comments

3 comments
Date Votes
  • My guess here would be that you're trying to restore the last session with the Deploy user account vs the logged on user.

    1
  • Thanks Mike, but unfortunatly this happend with both, logged on user and deploy user account, so it should be something else.

    1
  • Razz,

    PDQ Deploy packages are designed to wait until the previous command or step has finished running before proceeding to the next one. It is hanging because of the method you are using to call chrome.exe. When the package timeout is reached, it closes all running executables that were launched via the package which is also by design-- it's trying to clean up after itself.

    Try calling chrome.exe this way instead:

    start "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --restore-last-session" && exit 0

    That should open chrome and then close the command prompt with exit code 0 (success).

    1