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



thanks for checking, i've now updated the main script with the fix :)

Share this post


Link to post
Share on other sites

yeah! that's it! i m using spanish language and it returns "Falso" hehe :) 

now seems that it's working 

thank you !

 

image.png.076bf69342e5b8340cec80655e54fdbc.png

 

image.png.e9eeb29610f129c55bb75fdce831e787.png

  • Thanks 1

Share this post


Link to post
Share on other sites

please re-download the main scripts and tell me is it working as designed

Share this post


Link to post
Share on other sites

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

and i've updated the main script with that fix now fyi

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

So if I am reading the above correctly after the reboot the task sequence should start automatically or will the user still have to login? 

Won’t the wrapper script run again?

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?

Share this post


Link to post
Share on other sites
9 hours ago, anyweb said:

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

Thanks will do. I do however see an issue with the logic as it stands right now based you your response. You do the pending reboot check before you check VPN connection, disk space, battery power or hardware support. If the computer has a pending reboot you are telling the system to Exit0 and reboot which in theory should kick off the task sequence however if the system is not compatible or not enough disk space or not on AC power none of those items would be checked.

Better logic would be:

- Hardware Support
- Power
- Disk space
- VPN
- Pending Reboot

Thoughts?

Share this post


Link to post
Share on other sites

good thoughts, i'll look at it and possibly reorder things, thanks for the comments

 

check for power, vpn and disk space will endlessly prompt the end user until resolved, so that leaves hardware support, but i'll look at it again

 

Share this post


Link to post
Share on other sites

The latest files from 2/2/18 have an issue with PCs with no battery. The Windows10RequiredUgradeWrapper.log is stuck in infinite loop of "Computer does not have a battery".

  

image.png

Edited by Batman
I redownloaded the scripts and fix worked. Thanks

Share this post


Link to post
Share on other sites

gotcha ! thanks for posting this i'll modify the code shortly

 

 

Share this post


Link to post
Share on other sites
2 hours ago, webguy said:

Thanks will do. I do however see an issue with the logic as it stands right now based you your response. You do the pending reboot check before you check VPN connection, disk space, battery power or hardware support. If the computer has a pending reboot you are telling the system to Exit0 and reboot which in theory should kick off the task sequence however if the system is not compatible or not enough disk space or not on AC power none of those items would be checked.

Better logic would be:

- Hardware Support
- Power
- Disk space
- VPN
- Pending Reboot

Thoughts?

i've changed the code order so it performs the checks like this, i'll upload the updated code shortly

 

image.png

Share this post


Link to post
Share on other sites
34 minutes ago, Batman said:

The latest files from 2/2/18 have an issue with PCs with no battery. The Windows10RequiredUgradeWrapper.log is stuck in infinite loop of "Computer does not have a battery".

  

image.png

ok bug found and fixed, please re-download the scripts, retest and let me know is it ok for you

Share this post


Link to post
Share on other sites
3 hours ago, anyweb said:

i've changed the code order so it performs the checks like this, i'll upload the updated code shortly

 

image.png

Thanks. I'll test it out here shortly on a device that I have tricked into thinking it needs to be rebooted. Curious I see that for the pending reboot you returned it to Exit99 I thought you said for the task sequence to kick off after the reboot it would have to be Exit0. Either way I will test and adjust.

I will suggest for sanity of the end user to do the hardware check before disk space, vpn, etc. no sense having them clean up disk space, connect power or disconnect from VPN if they are then going to be told their hardware is not compatible with the upgrade. Just a thought. 

/Paul

Share this post


Link to post
Share on other sites
Curious I see that for the pending reboot you returned it to Exit99 I thought you said for the task sequence to kick off after the reboot it would have to be Exit0. Either way I will test and adjust. 

yes, i tested it some more and decided it's the best option for now, however i have some ideas to improve upon it going forward, and if i get time i'll script the, but for now this will have to do

I will suggest for sanity of the end user to do the hardware check before disk space, vpn, etc. no sense having them clean up disk space, connect power or disconnect from VPN if they are then going to be told their hardware is not compatible with the upgrade. Just a thought.  

good point,  i've modified it again so that the check if model supported is the first check, i've uploaded the modified scripts

thanks.

Share this post


Link to post
Share on other sites

nice job thanks for sharing Marcin :)

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...