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

well spotted, except that one is remmed out hence the //

so it doesn't do anything (it's a comment)

cheers

 niall

Share this post


Link to post
Share on other sites


12 hours ago, anyweb said:

well spotted, except that one is remmed out hence the //

so it doesn't do anything (it's a comment)

cheers

 niall

ooh wow, totally missed that.. 

Thanks..

Share this post


Link to post
Share on other sites

if you open the HTA using Notepad ++ and change the Language used to VBScript (VBS) or HTML in Notepad ++ you'll see it format the HTA nicely and it'll make more sense.

Share this post


Link to post
Share on other sites

Hello,

First of all, congratulations for your great work !

I'm trying to edit the HTA to disable checkbox / onedrive, but I can not ... Is there a simple way to do it?

(Sorry if this is a dumb question)

Share this post


Link to post
Share on other sites

thanks !

you need to cut out this bit

image.png

and then modify this function to ensure that Upgrade Now button is not disabled

 

function disable_enable(){
    if (document.getElementById("Checkbox1").checked == true)
      //alert('checked');
      document.getElementsByName("run_vbscript_button").item(0).disabled = false;
    else
    //alert('not checked');
    document.getElementsByName("run_vbscript_button").item(0).disabled = true;

 

cheers

niall

Share this post


Link to post
Share on other sites

that's exactly what I did, but then I had an error on line 78.

I will watch ...

Thank you so much !

Edited by lololo

Share this post


Link to post
Share on other sites

Thank you so much sir!
 I keep getting compatibility scan issue on my Windows 7 VM, and it does not continue. I am curious about the return code check I am getting a return of one of the known codes but it still says it can't continue with the Installation.

Share this post


Link to post
Share on other sites

hi can you post the logs from C:\Programdata\ so i can take a look ?

Share this post


Link to post
Share on other sites
On 6/1/2018 at 9:13 AM, tasmo said:

Hi,

"Disable 64-bit" is checked but i also tried uncheck, same.

Thanks !

RegAdd.PNG

RegAdd - Date.PNG

RegAdd - Registry.PNG

Hello,

I had the same problem, the variable is not solved .... I modified the command like this so that it works:

cmd.exe / c "reg add" HKEY_LOCAL_MACHINE \ SOFTWARE \ CHUV "/ v RequiredUpgrade_1809 / t REG_SZ / d"% date% "/ f"

have a good day

Share this post


Link to post
Share on other sites

OK I've been through a couple of iterations with this method. Aside from the odd user who shuts down their computer during the upgrade (argh!) the process has been relatively smooth once I sorted out creating logfiles for each user on multiuser machines. The two bits which I'm going to try adding based on my experience are:

1) A time limit whereby after lets say two weeks if no user has had their five deferrals the countdown timer will run anyway (finding on some multiuser machines they never get to five deferrals)

2) The ability for the scheduled deployment to work out when a machine is not logged in and run the task sequence anyway (finding that some PCs are rarely logged into so indefinitely sit there not upgrading because of the lack of an interactive session).

Thanks for this invaluable extension.

Share this post


Link to post
Share on other sites

I`m starting to test the use of this method for the second time. This time is to upgrade to 1809.  Some users have reported to me that the defferal count has not been reset to the 8 times i have configured.

If they defered 2 times during last Windows upgrade, they now have only 6 defferals left.  Some had zero and where forced to do upgrade imediatly.

Seems to me that the "HKCU\software\windowsnoob  -  NumberOfUpgradeDefers"  is not getting reset after a succesful upgrade.

How can i fix this ?

 

Share this post


Link to post
Share on other sites

make sure you download the latest version of my script(s), there was a bug with a previous version where it wasn't getting reset. The PowerShell wrapper should reset the delete the values entirely prior to launching the task sequence.

Below is the section of the wrapper.ps1 that does this fyi.

# clean out registry settings for the next upgrade attempt.
LogWrite "Starting: remove the UpgradeComputer reg keys so that the next upgrade cycle can start fresh."

$regpath = "HKCU:\Software\$CompanyName\"
$regkey = "UpgradeComputer"
DeleteRegKey $regpath $regkey

$regpath = "HKCU:\Software\$CompanyName\"
$regkey = "NumberOfUpgradeDefers"
DeleteRegKey $regpath $regkey

$regpath = "HKCU:\Software\$CompanyName\"
$regkey = "Timer"
DeleteRegKey $regpath $regkey


LogWrite "Starting: Exiting wrapper with exit code 0 and about to start the task sequence now."

 

Share this post


Link to post
Share on other sites

Thanks Niall,  i was in fact using old files...the vbs versions.

With the PS version, i found an issue though.  we have our windows 10 OS in french so the OS name is diffrent than what you specify at line 361 of the wrapper.ps1.  I ended up omitting those few lines of code to bypass it.

The problem i have now is that it doesn`t launch the upgrade.hta so the user doesn`t see the popup window to accept.

Can you point out where exactly the HTA is executed ?  Thank you.

Share this post


Link to post
Share on other sites

the vbs version had some issues and it was vbs, so it's definitely better to use the PowerShell version, i've seen your issue before, I think the French spelling for Enterprise is Entreprise, correct me if i'm wrong, the line you need to edit is this one, number 360

 

If ($OperatingSystem -eq "Microsoft Windows 10 Enterprise")

if you change it to this, it should work in your environment, please test and give me feedback

if (($OperatingSystem -eq "Microsoft Windows 10 Enterprise") -or ($OperatingSystem -eq "Microsoft Windows 10 Entreprise")) 

cheers

niall

Share this post


Link to post
Share on other sites

Yes i had found the line 360 but even when i change it to the french word it still didn`t find windows 10 but i don`t know why because when i run "gwmi win32_operationsystem" manually on a computer, the output is exactly as i spell it.

Anyways, i ended up omiting that section of code and now i`m only looking for the build number and that works.

I also had to add a few lines at 395 in order to create the reg key HKCU:\software\"company name" because it previously didn`t exist….and if it doesn`t exist, it can`t subtract a deferal count.

Thank you for your time, i think the changes i made will work for me.

Share this post


Link to post
Share on other sites

hmm i wish you'd use the edit i did above as that would confirm if it works on French Windows,

what happens when you try with the code i added above ?. can i see what it outputs ?

Share this post


Link to post
Share on other sites

i didn`t try it with the If and -or but when i tried it with the french spelling only, the log wrote something like  "did not find windows 10, continuing."  and then obviously didn`t do the upgrade.

I just checked the PC that i ended up upgrading last friday.  Is it normal that we have to answer a bunch of questions when we first logon ?  Is there a way to remove it ?  Questions like, do you want to use Cortana, do you want to activate localization, do you want to use speach to text.  This is OK for users but not OK for lab computers.

Share this post


Link to post
Share on other sites

if you get a chance to try my edit i'd be grateful,

as regards the OOBE, you shouldn't have to answer questions at first login, those can be customized using an unattend.xml file

Share this post


Link to post
Share on other sites

tried again with -->   if (($OperatingSystem -eq "Microsoft Windows 10 Enterprise") -or ($OperatingSystem -eq "Microsoft Windows 10 Entreprise"))

Result in the log file is --> This is not an approved operating system for the Windows 10 Ugprade, exiting with code 99, detected: 'Microsoft Windows 10 Entreprise'

So even though the spelling is exactly the same, it still fails.  It`s OK….Checking for version number only is fine for me.  Computers understand numbers better anyway :-)

Share this post


Link to post
Share on other sites

they do but you still need to know if it's win7 or win10....

if you get time over teamviewer later i'd like to spend ten minutes with this to have a look

Share this post


Link to post
Share on other sites

[SOLVED] Applocker blocked wrapper.ps1 :) - Checking the Windows10RequiredUpgradeStart-Upgrade.log and i saw that the powershell scripts are copied to local appdata. Then i checked the applocker event and bingo the script were blocked. 

 

Hi Niall, thank you for your guides.

I need to Upgrade from 1803 to 1903 because of performance problems with spectre v2.

My first and second try to get your soulution to run are without success.  :(
When i start the upgrade process via software center the hta pops up. But before i do any actions on the hta the task sequence  starts and go step by step through the TS. 

I checked each step you described in your guide but i can't finde the error.

I'm still using thte ConfigMgr 1902 with first Hotfix Rollup.

 

Thank you in advance

 

Edited by andi82

Share this post


Link to post
Share on other sites

great that you solved it Andi,

cheers

niall

Share this post


Link to post
Share on other sites

I am using this for our upgrade from 1703 to 1809 and it is amazing, exactly what I was looking for.
Thank you Niall for all the work you have put into this, much appreciated!

  • Thanks 1

Share this post


Link to post
Share on other sites

thanks for the feedback 🙂

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