Jump to content


anyweb

Forcefully upgrading Windows 7 or Windows 10 to a newer version of Windows 10

Recommended Posts

In March 2017 I blogged a method to allow you to forcefully upgrade your Windows 7 or Windows 10 computers  to the latest version of Windows 10 using a popup (HTA) that gives the user some form of control (5 deferrals).

Note: if you want to see how many days of support are left for Windows 7 extended support click here.

This was very popular and spawned different versions of the same original concept by other MVP’s and the community at large. I always wanted to update mine, but never had time, however what I have done is incorporate bug-fixes and features, and rewritten the original VBS wrapper code to PowerShell. In the next version I’ll replace the HTA with a PowerShell gui.

So how about listing the features of this solution.

  • Designed to run as required
  • Runs before the task sequence starts
  • Shows the user a popup with options
  • Can run on Windows 7 or Windows 10
  • Allows deferrals
  • After deferrals run out, starts a 4 hour timer
  • If the user ignores the popup, subtracts one deferral after 8 hours
  • Checks for Power
  • Checks for hard disc free space
  • Checks for Supported Model
  • Checks for VPN
  • Is easy to Brand with your company details
  • Has several checks to ensure it won’t run by accident

So that’s enough of the features, here’s a look at what it will look like to the end user running either Windows 10 or Windows 7.

popup-in-Windows-10-1024x768.png
Time to upgrade
popup-in-windows-7-1024x768.png

In the above screenshot, the user sees the popup daily at a time that you decide eg: 11am. The user has a number of choices:

  • Upgrade now by clicking on the box ‘my files are backed up’, and then selecting Upgrade now
  • Upgrade later by clicking on Defer
  • Cancel, by clicking on the X in the top corner, this will remove one deferral. Note that this verifies how many deferrals are left and if there are none left, will start the task sequence
  • Do nothing. The popup will auto close after 8 hours and remove one deferral.
  • Kill it with Task Manager, this will remove one deferral.

If the user runs out of deferrals the 4 hour timer will start.

4-hour-timer-1024x768.png

If the user still does nothing, when the 4 hours runs out the task sequence will begin. They can of course click the checkbox and select Upgrade now to start it at any time.

Branding

So how can you add your branding to it ? start with the banner.png. Open it in MSPaint and replace the windowsnoob logo with your own, try and keep it to 500×65 pixels otherwise you’ll need to edit the Upgrade.HTA code also.

editing-the-banner-1024x580.png

Next, open the wrapper.ps1 in PowerShell ISE. Edit CompanyName in line 15 to suit your Company Name.

company-name-1024x802.png

Save the changes, next, open upgrade.hta in Notepad ++. Edit CompanyName in line 50 to suit your company name.

 

image-3-1024x667.png

edit line 395, and put your company name in

 

image-4-1024x667.png

 

 

Troubleshooting

The popup creates 3 log files in C:\ProgramData shown below

  • Windows10RequiredUpgradeHTA.log
  • Windows10RequiredUpgradeWrapper.log
  • Windows10RequiredUpgradeStart-Upgrade.log

The process creates registry keys (and deletes them upon successful closure of the HTA before starting the task sequence).

image-2.png

For more details about how to set this up in your environment, please see the following blogpost. I’ve updated that blogpost to include the new files and the PowerShell wrapper.ps1.

Note: To download the files included, you need to be a registered member of windows-noob.com

 

cheers

niall

  • Thanks 2

Share this post


Link to post
Share on other sites

here's a quote from the original post:

Tip: If you have rendering issues with the popup on different devices then edit the call ResizeWindow(425,335,500,375) values and ResizeWindow Function  in UPGRADE.HTA to fit your specific needs, I don't have access to too much hardware to test this on. The popup is fixed, if you want the user to be able to move it change the line caption="no" to caption="yes". If you want to programmatically use it then add a Window.moveTo(x, y) line.  

cheers

niall

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.