BGIn-Place Upgrades

image

image
If (You Enjoy Reading)

{
I thought that was a clever title, but it seems more confusing the longer I look at it… anyway, this is the follow up post to take BGinfo from MDT, and add it’s capabilities to the ConfigMgr In-Place Upgrade Task Sequence Process.  If you’ve been working with in-place upgrade task sequences, you’ll know they are a different beast than regular OSD.  You can’t just call an application and expect it to show up on the screen.. like in OSD, you can say Command Line Step: notepad.exe… and guess what, a notepad.exe window opens during the TS.. freaking amazing!

In Place Upgrades also have new challenges we didn’t really have before with OSD.  OSD (bare metal) typically meant it was a clean image, we didn’t have end users sitting in front of it while installing the OS, didn’t have user profiles already full of “super precious data”, we really didn’t need to worry about the end user experience.  Now here comes Windows 10, Love it or love it, it’s here to stay, Windows as a Service, it means once OSD is done, that was the easy part, now we have to “touch” that computer every 6 months with a large upgrade.  Now we do have users to worry about, we have their precious little datas, and we have to deal with users who don’t read emails, and don’t read popups, and don’t read “ARE YOU SURE” dialog boxes, who just click “Sure” when something pops up, then freak out when it reboots 15 minutes later after they “consented” to an update.  And because they were working on large sales strategy document they only save on their desktop (Where else would you save business critical documents), and because the moon was full and the person sneezed in the cube adjacent, their document is now gone, or corrupted, or missing 4 days of edits!   Anyway, my point, we have the privilege of attempting to provide a decent user experience and making the process the most user friendly while still applying a huge upgrade that is ripping out the guts of the OS and dropping in the newer OS, with features they didn’t really request, and unknown stability with their current business apps.  But I digress…

Where was I going with that… oh yeah, ways to let the user know that hey “A BIG UPGRADE IS HAPPENING… SAVE YOUR STUFF”.  I’ve done this in the past with changing the Lock Screen, creating a method to prevent a user from logging on, but what if the user is logged in, they started the TS, but still just don’t get it… how about we temporarily change the background and put up a message that displays for that logged on user until the moment that beautiful first reboot happens?  I say, why not… lets do it.  My idea, steal MDT’s Bginfo “Set Status” Step, and add it to the In Place upgrade TS.  I copied  over the “Use MDT Tool Kit” Step, and “Set Status 2” Step, but when it ran that step in the TS… ERROR city.  Figured it was too easy. So this is what I had to do.

}

Else
{

Assuming you followed the last blog, you’re most of the way there. (I’ve provided all of the files in the zip download, so you can steal those or create your own)

Your folder structure will look like this basically:
image

  • BGInfo64.exe – Download Here
  • vbs scripts – to be used for the custom fields
  • ServiceUI.exe – Take from MDTPackage\Tools\x64
  • BGI file(s) – Create new, or steal from MDT – Included in my download
  • Image file (.bmp) – Create new, or steal from MDT – Included in my download

Open your BGI File with BGInfo64 and add your fields and text (or modify the one I’ve provided)
imageNote, this will be different than the one we used for OSD, as this time, it is running in the OS, and not WinPE.
Set your Background, note, do not use the full path, just the name of the file, as all of the required files are located in the same directory.
image

Ok, the BGInfo part is done, feel free to press Preview and confirm it looks how you want, when you’re satisfied, save everything, and create your ConfigMgr package and distribute
image
Now that you have your package ready, its time to add it to the TS
image
Run Command Line Step

Basically, we’re stealing the logic from the ztiSetBackground.wsf file in MDT Scripts, and manually creating the command line:
"bginfo64.exe WinUpgradeGaryTown.BGI /nolicprompt /silent /timer:0"
But you’d quick learn, that doesn’t work… you need to use ServiceUI.exe to make it visible, which once you figure out that syntax, you get this:

Now add a condition that it only runs if it was user imitated.  no point in changing the background is no one is there to see it. 🙂
Also have seen this step failed if a user is NOT logged on.  So recommend you set to "Continue on Error" if you plan to have it run without checking to see if  a user is logged on, and run it without a user logged on.

TS Variable = _SMSTSUserStarted = True

 

Now, sit back and watch your TS give the user something they can’t avoid… unless their desktop is completely covered with files / icons…

}

7 thoughts on “BGIn-Place Upgrades

  • February 15, 2018 at 4:41 am
    Permalink

    Hey Gary,
    Nice stuff with the in-place...:) when i try to download the files, it says no file found...:)
    Cheers Henrik Elgaard

    Reply
    • February 15, 2018 at 8:57 am
      Permalink

      Sorry about that, Link is fixed.

      Reply
  • February 21, 2018 at 11:14 am
    Permalink

    Where is the download link on here? I see a 'download here' wording but not showing up as a link.

    Reply
    • February 21, 2018 at 9:35 pm
      Permalink

      The link is in the middle of this sentence: (I’ve provided all of the files in the zip download, so you can steal those or create your own) - the links aren't underlined by default with this template, I'm thinking I might change that, as links are not very obvious.

      Reply
    • February 21, 2018 at 10:56 pm
      Permalink

      Alright, spent some time tonight playing with the CSS code, and made some changes to make links stand out a bit more.

      Reply
  • February 22, 2018 at 9:48 am
    Permalink

    So if the upgrade fails, I have a custom message that appears indicating what failed, how do I remove the BGIinfo background or turn it off so that the original background returns?

    Reply
    • February 22, 2018 at 9:15 pm
      Permalink

      When I reboot, it automatically reverts to what it was before, are you not experiencing that? Or do you mean reverting without a reboot? I'm looking into now, I'm pretty sure it's just modifying some registry keys,trying to track down exactly what it's doing so it can be reverted. If you run it as a user, it modifies HKCU\Control Panel\Desktop\WallPaper and 2 other values in that key. I'll reply and update the post when / if I figure out how to revert. Unsure how you'd revert though without rebooting.

      Question, are you using the default Wallpaper file location? c:\Windows\Web\Wallpaper\Windows\img0.jpg? If you are, you can just us BGInfo again to put the original wallpaper back. If your users have custom pictures located anywhere on the machine, then I don't know of a way to reset the wallpaper besides just allowing the reboot to reset it. I have successfully used an identical step in the TS with a modifed .bgi file to load the default wallpaper again. Depending on how you setup your TS, you can have it run that step to load the default wallpaper before you create your user popup. If you need any help, PM me up on Twitter @gwblok

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *