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

This is great. Is there a way to have it "time out" and continue on with the upgrade if either the computer isn't logged on or the user doesn't respond in a certain amount of time?

Share this post


Link to post
Share on other sites


it will automatically time out if the user does nothing after 8 hours and will remove one deferral, if none are left the upgrade will start (if applicable), that's adjustable of course (in the HTA). Currently this is done in such a way that a user must be logged on, but you can change that behaviour if you wish (however, you might get some unhappy users...)

Share this post


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

 Currently this is done in such a way that a user must be logged on, but you can change that behaviour if you wish (however, you might get some unhappy users...)

How do I change this?

Share this post


Link to post
Share on other sites

you can change how it's deployed, currently you deploy it 'when a user is logged on'. if you change that to whether a user is logged on or off you'll also need to update some of the logic, i think you need to re-read the original blog post, i mention it there i'm sure.

Share this post


Link to post
Share on other sites

make sure to test test test if you do go that route though. Remember, if 'no user' is logged on, then no one will see any popup and it will just upgrade once the 5 deferrals are gone.

Share this post


Link to post
Share on other sites

Hi!

We're having some problems with the start-upgrade.ps1 script in a customers environment. The Task Sequence cannot start this script because of a access denied error (see attached file). The users are not local admins. I'm wondering if local admin rights is a prereq, because the program runs with User Rights? When I login with a user account with local admin rights, it works fine.

Se attached file with error message from execmgr.log

//Christian

execmgr_log.jpg

Share this post


Link to post
Share on other sites
14 minutes ago, Christian Silvert said:

Hi!

We're having some problems with the start-upgrade.ps1 script in a customers environment. The Task Sequence cannot start this script because of a access denied error (see attached file). The users are not local admins. I'm wondering if local admin rights is a prereq, because the program runs with User Rights? When I login with a user account with local admin rights, it works fine.

Se attached file with error message from execmgr.log

//Christian

execmgr_log.jpg

The HTA package is prestaged in a Task Sequence (with a Download Package Content step). So the package is already in the ccmcache when the actual upgrade Task Sequence tries to run the script.

//Christian 

Share this post


Link to post
Share on other sites
1 hour ago, Christian Silvert said:

The HTA package is prestaged in a Task Sequence (with a Download Package Content step). So the package is already in the ccmcache when the actual upgrade Task Sequence tries to run the script.

//Christian 

Hi again!

When we add the user account with full control permissions on the ccmcache folder, it works. So it is a permission error. How can we solve this? Is there a reason why the script needs to run with user rights? 

Share this post


Link to post
Share on other sites

hi Christian,

I'll double check in my lab and come back to you shortly, thanks for your patience

cheers

niall

Share this post


Link to post
Share on other sites

ok just tested it in my lab with a user that is a standard user, and it starts the powershell wrapper no problem at all.

so something else must be different in your environment, double check your settings pls

 

image.png

Share this post


Link to post
Share on other sites

i suspect this is why it's failing for you

 

image.png

verify this tab on your package

image.png

 

Share this post


Link to post
Share on other sites

Yes, it is a strange behaviour!

The Copy Content in this package... was already checked. 

The difference I see between a working client and a non-working is this: 

Working (the standard user has Full Control to the folder for some reason): 

image.png.f3aaa44593a45a4dc0d8683dbd035711.png

 

Non-working (no standard user permissions): 

image.png.28745decd2ac3ca91a776e8509fcf810.png

Have you tested the permission difference for the ccmcache folder in your lab?  Notice that the package is pre-downloaded to the cache with a prestage TS. Maybe that can cause problems?

Thanks!

Regards, Christian 

 

Share this post


Link to post
Share on other sites

hi Christian,

i'm not using any prestage TS, so yes that might be part of your problem.

my user also doesn't have access to the ccmcache but as i said, it's working just fine for me

 

image.png

Share this post


Link to post
Share on other sites

Thanks for the scripts and screen shorts. thanks again for lot of time you took creating them.
I have tried the scripts but i am hitting a brick wall, please help. how can i confirm this using the script or what can i do to pass thru this stumbling block? see attached.

N.B. this confirmation window pops up when upgrading manually.

if there is a script to eliminate this problem, it will be greatly appreciated!

Regards

windows upgrade graphic error.PNG

Share this post


Link to post
Share on other sites

you can adjust the Upgrade Operating System step there's a switch you can add to ignore these types of warnings, have you tried setting this step

 

image.png

Share this post


Link to post
Share on other sites

yes i did but it keeps failing , here is part of the log:

Windows upgrade progress: 0%    OSDUpgradeWindows    04/11/2019 17:41:54    9176 (0x23D8)
Windows upgrade progress: 12%    OSDUpgradeWindows    04/11/2019 17:42:34    9176 (0x23D8)
Process completed with exit code 3247440392    OSDUpgradeWindows    04/11/2019 17:43:30    10132 (0x2794)
ExecuteWithTimeout returned Windows Setup process hexadecimal exit code 0xC1900208 (decimal 3247440392)     OSDUpgradeWindows    04/11/2019 17:43:30    10132 (0x2794)
Could not read Windows Setup progress regkey value 'SetupProgress' at 'HKLM\SYSTEM\Setup\MoSetup\Volatile'. Stopping UI progress. (0x800703fa)    OSDUpgradeWindows    04/11/2019 17:43:34    9176 (0x23D8)
Windows upgrade progress: 14%    OSDUpgradeWindows    04/11/2019 17:43:34    9176 (0x23D8)
Waiting for Windows Upgrade Setup process to return ...    OSDUpgradeWindows    04/11/2019 17:43:34    9176 (0x23D8)
Wait for event returned 0    OSDUpgradeWindows    04/11/2019 17:43:34    9176 (0x23D8)
Windows setup completed with exit code hexadecimal 0xC1900208 (decimal 3247440392)     OSDUpgradeWindows    04/11/2019 17:43:34    9176 (0x23D8)
Saving exit code of Windows upgrade - hexadecimal 0xC1900208 (decimal 3247440392) -  to Task sequence environment variable '_SMSTSOSUpgradeActionReturnCode', as decimal string    OSDUpgradeWindows    04/11/2019 17:43:34    9176 (0x23D8)
Windows setup in 'scanOnly' mode returned exit code hexadecimal 0xC1900208 ( decimal 3247440392) . Failing task sequence step.    OSDUpgradeWindows    04/11/2019 17:43:34    9176 (0x23D8)
See the list of error codes to identify the type of upgrade compatibility issue found.    OSDUpgradeWindows    04/11/2019 17:43:34    9176 (0x23D8)
upgrade.Run(), HRESULT=80004005 (upgradewindows.cpp,1779)    OSDUpgradeWindows    04/11/2019 17:43:34    9176 (0x23D8)
[ScanOnly]: Exiting with code 0x80004005    OSDUpgradeWindows    04/11/2019 17:43:34    9176 (0x23D8)
Process completed with exit code 2147500037    TSManager    04/11/2019 17:43:34    7388 (0x1CDC)
 

smsts.log

Share this post


Link to post
Share on other sites

well it could be that your error is a hard block, did you check the appcompat logs to see if it was listed as a hard block ? you can't ignore hard blocks..

Share this post


Link to post
Share on other sites

ok can you grab the app*.xml files and setup*.log stored in the $windows.~bt\Sources\Panther location after the windows upgrade failure, zip them up and attach them here i'll take a look.

Share this post


Link to post
Share on other sites

Thank you for the great work on this great tool.. 

 

Couple of question for you.. Is there a way to check that a hardwire is connected (network) and if not, exit the script.. along the same line I am not quite sure what information to place into the VPN section so that I can properly detect if the user is using VPN and then show the message you already have.  Are we looking to enter the gateway/subnetmask/

Thanks.

Share this post


Link to post
Share on other sites
Quote

Thank you for the great work on this great tool.. 

thanks!

yes you could check for the ip range that your network cables use (as opposed to wireless), and detect based on that,

all networks are different so you'll have to customize it somehow to suit your environment

cheers

niall

Share this post


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

thanks!

yes you could check for the ip range that your network cables use (as opposed to wireless), and detect based on that,

all networks are different so you'll have to customize it somehow to suit your environment

cheers

niall

Thanks for the reply.. I ended up using pieces from you as well as another script I found.. Bottom line I am testing for VPN connection and Wi-Fi.. In case this might help someone else in the future - 

 

# check for Wifi/Wireless connection

$WifiCheck = Get-wmiobject -class win32_networkadapter -namespace root\CIMV2 | where-object {$_.Name -match "Wifi" -or $_.Name -match "wireless" -and $_.name -notmatch "Microsoft Virtual WiFi Miniport Adapter" -and $_.netenabled -eq $true}
$WifiCheck = [bool]$WifiCheck


if ($WifiCheck -eq 'True')
    {LogWrite "An Active Wireless Connection was detected, aborting with Exit code 99"
    $text="An Active Wireless Connection was detected. The Windows 10 Required Upgrade cannot continue while connected to A Wireless Network.  Please disconnect from Wi-Fi and retry the upgrade from Software Center the next time you are in the office. `n`nPress OK to exit the upgrade."
    ShowMessage ($text)
    ExitWithCode "99"}
else
    {LogWrite "Wireless Connection not detected, continuing..."}

# check for Cisco AnyConnect VPN

$NICS = Get-WmiObject -Query "Select Name,NetEnabled from Win32_NetworkAdapter where (Name like '%AnyConnect%') and NetEnabled='True'"
$NICS = [bool]$NICS


if ($NICS -eq 'True')
    {LogWrite "Cisco AnyConnect VPN was detected, aborting with Exit code 99"
    $text="Cisco AnyConnect VPN detected. The Windows 10 Required Upgrade cannot continue while connected to $CompanyName via Cisco AnyConnect VPN, please retry the upgrade from Software Center the next time you are in the office. `n`nPress OK to exit the upgrade."
    ShowMessage ($text)
    ExitWithCode "99"}
else
    {LogWrite "Cisco AnyConnect VPN not detected, continuing..."}

Share this post


Link to post
Share on other sites

thanks for sharing, please do let me know how you get on with this.

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