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

Nope I just downloaded the script you have attached to this post, unzipped it and copied the file to my lab machine. The file date on the scrip is 2017-03-22

If I make the following change then it works:

- if ($CollectionName -eq $Collection_1 -or $CollectionName -eq $Collection_2 -or $CollectionName -eq $Collection_3)

+  if ($CollectionName -eq $Collection_1 -or $CollectionName -eq $Collection_2 -or $CollectionName -eq $Collection_3 -or $CollectionName -eq $Collection_8)

The other question I have is about the collection for SUM Windows 10 Other, why there there a query of: select *  from  SMS_R_System where SMS_R_System.AgentName = 'Manual Machine Entry' trying to figure out its purpose as I also see that query in OSD Build and OSD Limiting.

And maybe I am not understanding but what is the actual purpose of the SUM Collections?

Share this post


Link to post
Share on other sites


i'll look at the script tomorrow if i get time and provide feedback, it's a while since i wrote it, and... I recently added that script after making some changes to the wrapper, so i may have uploaded the wrong script, but basically the SUM collections are Software Update Management,

Share this post


Link to post
Share on other sites

Thanks. Much appreciated. 

So I'm not sure I understand the purpose of the SUM Collections? Where would they by used in terms of Windows 10? Is this more for servicing?

One other item in the script I noticed, Line 277 says # add some exclude rules (exclude LTSB from all SUM collections except SUM Windows 10 LTSB), yet the code has SUM Windows 10 Other being excluded from the collections not LTSB. Not sure which is supposed to be correct. But this is probably mute anyways until I get a better understanding of what SUM is used for

Share this post


Link to post
Share on other sites

ok, apologies for the delay my lab died and i had to re-import all my vm's but it's running again now and i tested the script, you got the buggy one (sorry), i've re-attached the working one, please try it out and let me know if there's any problems or questions, i've tested it in a CM environment with no extra collections added and it worked just fine as you can see below,

image.png

give it a try !

 

image.pngcheers

niall

Share this post


Link to post
Share on other sites

Thanks, I will take a look here shortly and see. With regards to the SUM collections are they more in reference to Windows Servicing, or are you using them in relation to Windows Update deployments?

One other issue I came across today in testing is with the WindowsResize for the HTA. I had to adjust the original window size to:

Before Progress Bar: 425,335,500,545

After Progress Bar: 425,335,500,595

And it loads fine for anyone with a DPI setting of 96. But we came across a few systems with DPI greater than 120, this one was 144. And the box actually shrunk in size and does not show any of the buttons though they are their just not visible in the box. Any thoughts on this one? 

 

Share this post


Link to post
Share on other sites

as regards the SUM collections they are just sample collections that you can use for Windows servicing or Software Update Deployment, you decide

in relation to the DPI settings, you may need to adjust/change the values to suit the hardware that you have, I don't have access to every device so what I tested works for me on most devices, feel free to post your solution for those DPI's here for others and mention the hardware you tested it on

thanks for trying it out and sticking with it !

cheers

niall

Share this post


Link to post
Share on other sites

I really appreciate all the work you've put into this process--it worked perfectly in my testing environment.

However, when I deployed it to machines with different resolutions and scaling levels, the popup gets completely hosed.

This is at 1600x900, with Windows scaling at 150%:

5a04d24280fa0_creatorsupgradeerror.PNG.06a792e684ef44b59c9f5ba20555f49d.PNG

Notice that the "Upgrade now" and "Defer" boxes are unable to be checked, since they're outside the dialog box's edges. And it's even worse on 1920x1080 with 150% scaling, though I don't have a screenshot.

This has successfully run on my test machines and one user's machine, so the process is fine--it's just the box that needs fixing.

The only places I've modified the .hta are the parts with display text. I see the .hta has handling for different resolutions and DPI, but for whatever reason it's bombing when scaling gets involved. Is there anything you'd recommend to try?

Thanks for any help you can provide!

Andy 

 

Edited by kreienkaa

Share this post


Link to post
Share on other sites

i see the scaling is crazy in that screenshot, and i bet if you log off and log back on again it will look better, but alternatively you can adjust the dpi settings in the wrapper to fix this, if you want i can remote in via teamviewer and help you with this, just pm me your details

Share this post


Link to post
Share on other sites

I'm running into the same scaling issue in my environment. If you guys can figure out a good way to set the dpi scaling then I'd love to know as well! 

Share this post


Link to post
Share on other sites

In the .HTA file I changed the following line:

    If DPI > 120 then
        DESIGN_DPI = 160        'dots per inch
        'DESIGN_WIDTH  = 450    'pixels
        'DESIGN_HEIGHT = 365    'pixels
        DESIGN_WIDTH  = dw        'pixels
        DESIGN_HEIGHT = dh        'pixels
to

    If DPI > 120 then
        DESIGN_DPI = 96      'dots per inch <<---
        'DESIGN_WIDTH  = 450    'pixels
        'DESIGN_HEIGHT = 365    'pixels
        DESIGN_WIDTH  = dw        'pixels
        DESIGN_HEIGHT = dh        'pixels

This seems to have solved my scaling problems. You still need to adjust the Window size from above, reference: Call ReSizeWindow (425,335,500,535) in the code above the ReSizeWindow function. When the DPI is <120 the formula uses the design width and height 500,535 respectively. However when the DPI is >120 it will use the numbers 425,335 and then factor accordingly. To get mine to work I had to reduce those numbers somewhat but it now almost displaces the same as on a system with DPI set to 96.

  • Thanks 2

Share this post


Link to post
Share on other sites

glad you got it resolved !

my messenger inbox was full, but i've emptied it now :)

Share this post


Link to post
Share on other sites
On 12/14/2017 at 4:25 PM, PHGustavsson said:

I just wanted to stop by and say thanks for this!

I really think that something like this should be included as standard in ConfigMgr.

Snyggt värre, tack! :)

/P-H

thanks ! I appreciate the feedback and would be interested in seeing what you do with it  :-)

Share this post


Link to post
Share on other sites

Hi,

 

First of all: Great post! is so helpfull! 

 

It's working like a charm but i have some issue when checks for pending reboot, i reviewed that the computers doesn't have any pending reboot using this powershell:

Invoke-WmiMethod -Namespace "ROOT\ccm\ClientSDK" -Class CCM_ClientUtilities -Name DetermineIfRebootPending

 

i reviewed wrapper file and i have some doubts about Set objSysInfo = CreateObject("Microsoft.Update.SystemInfo"), what else can i review?

 

thanks!

 

 

Share this post


Link to post
Share on other sites
First of all: Great post! is so helpfull!  

thanks !

It's working like a charm but i have some issue when checks for pending reboot, 

can you expand on this, do you mean that it is not detecting pending reboots for you or ?

Share this post


Link to post
Share on other sites

Hi,

 

I'm doing some tests and i found this scenario:

 

  • Deployed the TS to some devices as available (not required only for testing pourpose).
  • This devices also have assigned some security patches (for current build not for the upraded one).
  • Device installs first the security updates and asks for a reboot.
  • We run the TS: it detects that are a reboot pending and a pop up appears asking for reboot (as expected).
  • Finally I rebooted the devices, I used the powershell to verify if the device is marked with reboot pending and run again the TS: The same message from wrapper.vbs asking for reboot is appearing and i don't now why.

So, the question is: how the wrapper.vbs verify that the computer have a reboot pending and why it's not working for me?

 

thank you!

 

Share this post


Link to post
Share on other sites

it states reboot pending based on the results of this check, so you probably do indeed need another reboot.

 

Set objSysInfo = CreateObject("Microsoft.Update.SystemInfo")

							'msgbox "Reboot required? " & objSysInfo.RebootRequired
							
							If objSysInfo.RebootRequired = "False" then
							'	msgbox "The computer did not need a reboot"

 

Share this post


Link to post
Share on other sites

I tried with 3 computers after applying security updates and rebooted 4-5 times but continues appearing the message

 

image.png.47e88fd347a690d42b46b650e9c2c128.png

Share this post


Link to post
Share on other sites
On ‎2017‎-‎03‎-‎28 at 5:33 PM, anyweb said:

 

i was finally able to make this work but only after removing the section in the wrapper.vbs that checked for pending reboot.  For some unknown reason, it always detected that my test system had to be rebooted.

i also had to remove the section that checked for computer model.  We obviously don`t have the same models and i won`t be deploying it to systems that don`t support Windows 10 anyways.

Any insight on my first point above would be great though.  Thanks.

Share this post


Link to post
Share on other sites

it works for me, I\ve tried both the PowerShell and a snippet of vbs code to test for reboot, can you please run it and check what it reports back ?

reboot required false.PNG

 

here\s the test script...

 

checkreboot.vbs

Share this post


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

it works for me, I\ve tried both the PowerShell and a snippet of vbs code to test for reboot, can you please run it and check what it reports back ?

reboot required false.PNG

 

here\s the test script...

 

checkreboot.vbs

i get : Reboot Required ? Faux   (our systems are in french).  Then when i click "OK", i get a secound box that says "The Computer needs a reboot".

Could it be because your script is looking for the word "False"

1.JPG

Share this post


Link to post
Share on other sites

yup that's it ! mystery solved 

  If objSysInfo.RebootRequired = "False" then

i've rewritten it, it's a boolean operator, please try this code instead

  If objSysInfo.RebootRequired = False then

does it work ?

checkreboot.vbs

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