Jump to content


anyweb

How can I forcefully upgrade Windows 7 or Windows 10 to the latest version of Windows 10 using System Center Configuration Manager (Current Branch)?

Recommended Posts

Good Day Mr Brady,

Just wanted to let you know that yesterday, i started using this script with a small group and found that the battery / ACpower detection part of the script doesn`t work.

It was not detecting that the laptop was plugged in even though it was and battery was fully charged.

I rem`ed out that part of the script to get around it and will tell the users to make sure they are plugged in during the upgrade.

Share this post


Link to post
Share on other sites

i've just downloaded it, and tested it on my surface Pro 4 with power not connected and i see this, in other words,  it's working fine...by the way the battery check only occurs AFTER the user clicks on Upgrade Now... or the 5 defers and 4 hours timeout are done,

can you checek the Windows10RequiredUpgradeWrapper.log file and see what it states for that check ?

also, did you make any modifications to my script ? maybe you accidently bypassed that step somehow

 

image.png

Share this post


Link to post
Share on other sites

It's been a while. All is good, just saw your fix for the reboot check, I will have to apply that to my modified script. I do have a question as it relates to using this process to upgrade to the next release of Windows 10.

If a user defers the install to the last minute it registers in the registry under HKCU:\Software\windows-noob the number of deferrals left. If after upgrading to Windows 10 1703 they have 0 deferrals left when you apply this process for 1709 it will immediately launch the upgrade without any opportunity to defer.

I've gone through the code a few times and have not seen anywhere that once the task sequence kicks off it clears these registry entries. Just a thought but it might be beneficial to add this functionality in, otherwise for each upgrade you will have to change the key that is written.

I was going to write something but my VBScript is lousy, but I thought I would check here first to see if you had some solutions especially if you have used this method to upgrade from previous versions.

Share this post


Link to post
Share on other sites

good point, fix added, here's the fix

 

                       ' delete the number of deferals left, so the next forced upgrade will start with 5 deferrals
                        KeyToDel = "NumberOfUpgradeDefers"
                        DeleteRegKey(KeyToDel)

 

i'll update the script with this fix shortly

 

Share this post


Link to post
Share on other sites

Thanks.

After comparing the updated script I have a question. For pending reboot check it appears you removed the AddRunOnce sub and changed the Exit99 to Exit0. 

My question is once the computer restarts how will it know to kick off the task sequence? Also won't adding Exit0 which has the entry to remove the NumberOfUpgradeDefers thus resetting the counter back to zero before the task sequence has completed. 

 

 

 

 

Share this post


Link to post
Share on other sites

Quote

My question is once the computer restarts how will it know to kick off the task sequence? Also won't adding Exit0 which has the entry to remove the NumberOfUpgradeDefers thus resetting the counter back to zero before the task sequence has completed. 

if it exit's with 99 the ts will never start, the ts can only start if it exits with exit code 0,

and as we know we are about to start the ts we clear the numberofupgradedefers reg key

Share this post


Link to post
Share on other sites

the user must login, and no the wrapper won't run again, the ts should start after the user logs in, please test, verify and report any issues

Share this post


Link to post
Share on other sites

Is there any way to use this with the Pre-download content feature?
Im testing it out but as the condition on Upgrade the Operting System is not evaluated to $true before C:\ProgramData\Upgrade_Forced.txt exists it will not pre-download the files.
 
Is there another way to build the ts so we can leverage pre-download content?
  • Like 1

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.