Jump to content
Brendo

Major Windows 10 Updates (Anniversary, Creators)

Recommended Posts

Looks like we are all getting there now, just in time for 1709 hey ;).

 

I have some success with silent install with reboot while no logged on user:

 

I have had a 50% success rate and working through misc errors now on pilot group, pre reqs are a compatible ISO & configured admin on client, I will look to add some of handling functions you guys have added here which may solve some of my current bugs.

 

 

- check freespace

- check version details

- create/update local admin user

- Transfer ISO from network via Shell as admin Robocopy

- Disable UAC and reboot

- Run the upgrade via powershell with mount and run quiet

- Sleep script

- Enable UAC and reboot

Share this post


Link to post
Share on other sites
I thought that the upgrade required operating as a logged in user. (I haven't ever tried it). It sounds like you are running with nobody logged in, and if they are logged in you log them out before proceeding. So it can be pushed silently, with no consent from a console user?

Nope. It runs just fine from login screen (with no one logged in). HOWEVER, in testing we've found that this seems to only work reliably on Ethernet-connected systems. Systems on wifi are not staying connected to CWA server when logged out so the script just pauses and eventually times out. Plus users are confused on when they can use things again if it just stays on a login screen. So I'm working on an update that will show a persistent message on screen rather than logging them out.

 

For a script that is not marked as an offline script, I am pretty sure that even if you pause, if the agent does not check in within a 15 minute window the script engine will kill the running script.
So far I haven't seen that be an issue. It seems to pick up again once the reboots for the update have completed. But the info you shared is definitely useful!

Share this post


Link to post
Share on other sites

@tlphipps, have you found you needed to disable UAC to perform the upgrade?

 

Right now, my script was attempting to execute the upgrade from the ISO. I realize this may not scale well, I am just testing it (with the possibility of giving up and switching to robocopy of the files over to the system first). Getting around UAC is my next hurdle in running the upgrade.

 

Also, is your script working with both domain and workgroup-based systems?

Share this post


Link to post
Share on other sites

No Uac issues that we've seen so far. Our script doesn't mess with it in any way.

Honestly, now that we aren't logging out, I don't really think the robocopy is necessary but early on I had some issues addressing the mounted ISO so I added the robocopy step and just haven't had a compelling reason to remove it.

 

Yes, works on standalone and domain joined systems both.

Share this post


Link to post
Share on other sites

ok, here's my promised update. I THINK I've rectified all of the issues we found (thanks to feedback here and from some of my internal users/guinea pigs).

Changes that I can remember:

  • no longer "logs off" the user before starting install. Now we are displaying a full-screen .hta file (HTML) when we start the actual installation that lets the user know we're doing the upgrade and they should just be patient and wait for the computer to reboot and finish the update.
  • Added a second 'helper script' to actually be used in the CWA tray icon. This allowed me to display a 'near immediate' notice to the user when they select that option in the tray and let me set a variable to manage later notifications in the 'main script.'

A few things to note/update:

  • Obviously you'll want to update the .hta file with your own branding
  • Be sure to edit the line that downloads this .hta to ensure the path is valid
  • Also be sure to edit the line for downloading the ISO file to ensure THAT path is valid (we recently moved this into an Azure blob storage account to increase download speeds)

So far, this solution seems to be solidly working for us. Any and all feedback you guys have is again greatly appreciated.

EDIT: See updated script: 

 

Edited by tlphipps
  • Thanks 2

Share this post


Link to post
Share on other sites
On 10/14/2017 at 9:00 AM, tlphipps said:

- notifies tech running the script of failure/success via email (thanks to Darren's awesome function script)

I've done a bit of poking around looking for said script and so far have been failing miserably... could someone point me in the right direction?

Update: NEVERMIND >_<
I didn't realize it was in the script expansion that tlphipps posted.

Edited by sjacobs

Share this post


Link to post
Share on other sites

@tlphipps I'll take a look at this.  I appreciate all your hard work.  My script was stalling at the ISO mount; for some reason it wanted UAC override, and with several people on vacation I haven't had a chance to re-visit it.

Share this post


Link to post
Share on other sites
On 12/19/2017 at 12:36 PM, b.kosty said:

Hey LoneWolf. @LoneWolfI also seem to be getting stuck at the mount point. Have you found anything regarding this?

I got the mount to work via calling a powershell script and dumping the output to produce a variable to get the drive letter.

My issue is that once the mount is successful, the upgrade wants privilege escalation (UAC) in order to run the upgrade.  Which makes running it unattended kind of, well, not possible.

I've temporarily put it on hold due to the holidays but am hoping to resume looking at it in January.  The big issue is that it isn't really an option to disable UAC (which also requires escalation), reboot, and start again.  I need to figure a way around requiring the escalation in the first place if possible, as I don't want to have to disable then reenable UAC, which adds two reboots to the cycle and a lot of complication.

Share this post


Link to post
Share on other sites
On 10/25/2017 at 6:07 PM, tlphipps said:

ok, here's my promised update. I THINK I've rectified all of the issues we found (thanks to feedback here and from some of my internal users/guinea pigs).

Changes that I can remember:

  • no longer "logs off" the user before starting install. Now we are displaying a full-screen .hta file (HTML) when we start the actual installation that lets the user know we're doing the upgrade and they should just be patient and wait for the computer to reboot and finish the update.
  • Added a second 'helper script' to actually be used in the CWA tray icon. This allowed me to display a 'near immediate' notice to the user when they select that option in the tray and let me set a variable to manage later notifications in the 'main script.'

A few things to note/update:

  • Obviously you'll want to update the .hta file with your own branding
  • Be sure to edit the line that downloads this .hta to ensure the path is valid
  • Also be sure to edit the line for downloading the ISO file to ensure THAT path is valid (we recently moved this into an Azure blob storage account to increase download speeds)

So far, this solution seems to be solidly working for us. Any and all feedback you guys have is again greatly appreciated.

Upgrade Win10-ERG.zip

This is working great for me except for on windows 7 powershell doesn't seem to like mount-diskimage command.  I've upgrade to PS4 and doesn't work.  some searching says mount-diskimage only works on windows 8+.  Any suggestions?

Share this post


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

This is working great for me except for on windows 7 powershell doesn't seem to like mount-diskimage command.  I've upgrade to PS4 and doesn't work.  some searching says mount-diskimage only works on windows 8+.  Any suggestions?

Yeah, this version of the script won't work on windows 7. Prior versions of this used a zip file rather than an ISO. We quit doing upgrades for windows 7 so I didn't realize this deficiency until long after I posted this version. 

Share this post


Link to post
Share on other sites
14 hours ago, jg00d3 said:

This is working great for me except for on windows 7 powershell doesn't seem to like mount-diskimage command.  I've upgrade to PS4 and doesn't work.  some searching says mount-diskimage only works on windows 8+.  Any suggestions?

Have you tried upgrading to PS5?  Maybe it will help.

I only tried mine on Windows 10.  Personally, I'd rather do Win7 to Win10 upgrades manually.  There's too much cruft and too many things that can go wrong on a Windows 10 install.  I'd honestly rather clean-install Windows 10.  For me, this makes sense for feature upgrades, but I probably wouldn't automate a Windows 7 to 10 migration.

Edited by LoneWolf

Share this post


Link to post
Share on other sites

Hi just wondering if any of you have used this for the 1709 upgrade yet and if so was it successful? I have been working on my first attempt at a script this past week with not much luck.

hopefully all of your generosity and sharing your information will help me succeed .

Thanks

Share this post


Link to post
Share on other sites

Sure have, and I imagine most others here have also. If you follow whats been written here you should be fine.

Share this post


Link to post
Share on other sites

I've tested the script on a few machines trying to go to 1709. It runs without issue, but doesn't want to reboot after installing the upgrade. Anyone else running into this?

Edited by fcollins

Share this post


Link to post
Share on other sites

Here's the latest version of this script that we've now used successfully on over 100 systems. This one is pushing build 1709 but you'll notice you need to edit it to provide the path to your server hosting the ISO. I was a little lazy this time and just exported one script with all of the other ones embedded in the export. When you import this, you'll get the following scripts:

- Upgrade Win 10 (From Tray Icon) - ERG:  Script designed to be added to your tray icon to let users start the install for themselves
- Remove Duplicate Scripts in Queue: A function script I wrote to avoid having the same script queued multiple times for an agent
- Upgrade Windows 10 - ERG: The main show. This is what you run manually if you want to schedule the script for an agent yourself.
- BITS Download - ERG: Helper function script to handle downloading the ISO using BITS
- BITS Status - ERGTEST: Ignore this. Not really sure why it's here
- BITS Status - ERG: Helper function to the helper function script above. I know @DarrenWhite99 says you don't need to do it this way, but I had issues the 'official' way and this has been working for us.
- FUNCTION - Email Results to Technician*: @DarrenWhite99's amazing function script for emailing whoever kicked off the script giving status updates

I don't recall having any failure to reboot issues with this version.

NOTE: I've removed any function for upgrading from prior versions of Windows (7 and 8). This is strictly for doing build-to-build upgrades of Windows 10 systems now.

Upgrade Win10-ERG.zip

Edited by tlphipps
  • Like 4
  • Thanks 4

Share this post


Link to post
Share on other sites

I am running into an issue where we get to the BITS file transfer.

we are pulling from a local server \\server\Install\Win10.iso

 

the BITS transfer never starts.  I can run a BITS command in powershell and it will push the ISO in seconds.  Any ideas we can try here? much appreciated!

 

 

Share this post


Link to post
Share on other sites

Honestly I've never tried BITS from local network shares. It never even crossed my mind that would be a use-case since BITS is really designed for high-latency/low-bandwidth links. It's entirely possible I have something coded that's making that not work here. Or it's entirely possible (more likely) that the CWA BITS implementation doesn't handle UNC paths.

We use CWA caching at many of our locations so that's why the script has logic to check for that and use it if it exists. That's how we handle UNC downloads of the ISO. If you don't go that route, it sounds like you might need to modify the script a bit to change how it's downloading the ISO.

Share this post


Link to post
Share on other sites

thanks for your help. I guess what we are trying at our 40+ locations may not be how we should be doing. I'd like to access it on a network share at each location.  I'll keep digging

Share this post


Link to post
Share on other sites

You should definitely look at implementing the Cache folder for CWA downloads at your locations. It automatically caches downloads to a central file share at each location for you.

Share this post


Link to post
Share on other sites

@brendo - I downloaded the solution you linked and when opening the "Windows 10 - Install Feature Update" script I get the following. 

image.png.56261d09b6a131400072da949ab276f5.png

You have this problem as well? I'm going to reach out to support and see what they have to say but am wondering if others have the same problem.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×