Force reboot after Office installation - SCCM / MECM

net1994 131 Reputation points
2021-09-02T20:10:27.64+00:00

Hello all – We are upgrading from older versions of Office to Office 365 on several systems. We are sending via Software center so the user can see what is happening on screen (Office install splash screen, etc). It is marked as a required application and the deadline is 7 days after it appears in software center. However, my issue is I want the PC to restart right after Office is done installing. Either when the deployment hit’s the deadline or immediately after the user initiates the install before the deadline. In The deployment user experience tab, I selected ‘Config Manager client will force a mandatory device restart.’ The problem here is if a user initiates it before the deadline, it waits until it gets to the deadline to restart. In this case, I don’t want days or hours to pass until the system is rebooted.

I’ve been trying to think of a way to make this work, without success. One new idea is to take all the possible return exit codes for the deployment to have a hard reboot. Say for 0 & 3010 exit returns I set to a hard reboot behavior. But I’m not sure if there are other success exit codes.

I know a task sequence will do this no problem. I have a PowerShell script that warns users the PC is about to restart and then does so. Could run that after Office installs. However, we can’t do it via Task Sequence as it runs in machine context and the user won’t see anything and that must happen.

The Office installation XML file used doesn’t have a property for reboot control. I’m not sure if the office setup.exe that runs has install switches like that.

So besides modifying the restart behavior of the return codes, can you think of another way to have the PC restart after Office is installed (either user initiated or when the deadline is reached)?

Thanks!

Microsoft Configuration Manager
0 comments No comments
{count} votes

4 additional answers

Sort by: Most helpful
  1. Rahul Jindal [MVP] 9,126 Reputation points MVP
    2021-09-02T21:45:51.857+00:00

    I normally use PSADT for such customisations. Have a look at the link below. It is fairly easy to setup.

    psappdeploytoolkit.com

    0 comments No comments

  2. net1994 131 Reputation points
    2021-09-07T14:02:47.603+00:00

    Thanks Rahul - With PSADT, we'd have to start from scratch with our testing all over again and not practical. I know there is a lot of value in PSADT, but I wanted to check if I just fudge the exit codes for the install that would initiate a hard reboot. Does anyone have any thoughts on that?

    0 comments No comments

  3. Colin Ford 1,026 Reputation points
    2021-09-07T22:08:58.05+00:00

    just fudge the exit codes for the install that would initiate a hard reboot. Does anyone have any thoughts on that?

    I used to do that for various apps but the other way around to catch reboot code and turn them into 0's. It works and should work the other way around. You just need a wrapper script to catch the exit code and then the trick is a list of success codes, because they are not always 0 and 3010. If it matches a known success code then convert it to 3010 if not then pass the error code through.

    0 comments No comments

  4. net1994 131 Reputation points
    2021-09-08T15:16:22.977+00:00

    I took Rahul's suggestion and got what I needed. Originally went with a standard app deployment as it would show the office splash screen during install and this satisfied the requirement that the user 'sees something' to know the installation is happening. I setup a new task sequence with the same app and added a task sequence reboot step. With the task sequence, the TS progress bar is onscreen and so that satisfies the user 'seeing something.' (We will send out proper notification of course to users affected.) Also a big one here is that the TS progress screen yells at the user SAVE YOUR WORK before the restart.

    Summation: Rahul, you are da man!