Jump to content
danialbulloch

Contribution :Windows 7,8,10 Upgrade Script

Recommended Posts

Windows 7,8,10 Upgrade Script


This script will upgrade copies of Windows to whatever Windows 10 ISO you give it.  You will need to upload the Windows 10 ISO to your LTShare/Transfer/ folder(by default in the /ISO/ sub folder). For Windows 7 installs, you must put a copy of 7z.dll and 7z.exe in your LTShare/Transfer/ folder(by default in the \Software\7ZipCLI\ sub folder). This is because it extracts the ISO since Windows 7 can't mount it. I recommend a 32bit copy because they work for both 32 and 64bit. You can download the 7-Zip installer and open it with 7-Zip like a zip file to extract just those files without bothering to install it.

You can now also use an EDF to specify a UNC path to get the ISO from instead of downloading from the CWA server. The EDF is located under the TNE - Setup tab called TNE - Windows 10 ISO Location under the location screen. Double click on a location to find it. This should be in the format of \\server\iso, no trailing slash. If you put domain computer permissions on the share and the folder the CWA agent shouldn't have a problem copying it.

image.png.a983920e3351a2874a87de4e8ca1dbfa.png

Also just added, the script will now check to see if the ISO is in place before running, so you can create a script to preload the ISO.

Now supports Windows 10, 8, and 7. Sorry, no Windows 9 support at this time.

Thanks to @Slartibartfast, @johnduprey, and the rest of the community for contributions and bug reports.

More details and discussion can be found on the forum post:

If you are downloading the ISO directly from your CWA server, I might recommend the below to rate limit it. It is a script that will rate limit how many computers are running it at once. Of course, that will slow deploy, so you have to be careful not to accidentally run it on to many and cause it to run outside of maintenance hours.

 

 


 

Share this post


Link to post
Share on other sites

I get the following error when opening the script:

Error loading script:Syntax error: Missing operand after 'd259' operator.

 

Share this post


Link to post
Share on other sites

@lsquez and @plinley, that actually happens because you imported the script, but didn't reload your system cache afterwards. So the server knows about the EDF, but your Control Center client did not. You can reload the system cache by clicking the user icon in the top right, or I believe pressing ctrl+r. Or, if you want to go overboard, restart your Control Center completely.

Share this post


Link to post
Share on other sites

We are interested in using this script in our connectwise environment for upgrading computers from Windows 7 to Windows 10.

Share this post


Link to post
Share on other sites

On your Connectwise Automate server. Where exactly? I cannot say, that depends on your setup. If you cannot access the ltshare, you could preload it on client networks and put it on a local network share.

Share this post


Link to post
Share on other sites

I guess this is a hosted connectwise installation as we dont have any physical servers or equipment that this resides on.

Edited by CORGAN

Share this post


Link to post
Share on other sites

If you are on hosted, you are going to have to put the file somewhere else. You can change the download line in the script to be the other download option, and update the address to have the domain on it(and possibly folders). That's what a lot of people do when they are either on hosted, or don't have a lot of bandwidth to spare on their server.

Share this post


Link to post
Share on other sites

Having issues, and I'm not sure where, but I am recieving this message on windows 7 machines 

The results for the upgrade are as follows:
Script kicked off the install, so far so good. Check command results below for more details and potential issues.
Command results: WARNING: Unknown exit code. (Code: 0x)

I am only upgrading 1 machine at a time, this is the second machine tested, first machine that is Win 7, Win 8 worked great, any help is appreciated

Share this post


Link to post
Share on other sites
On 2/3/2020 at 7:39 AM, CORGAN said:

I guess this is a hosted connectwise installation as we dont have any physical servers or equipment that this resides on.

Here's what I did, change it from File Download to File Download URL, changed the link for this iso to a drop box with the iso on the drop box (make sure you make the iso public and grab a link) and it should now work

Share this post


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

@ObsidianJason There are logs of the install attempt stored in C:\tne\temp\ (unless you changed the default folder). That can be used to help debug any failures you have.

@Danialbulloch I attempted to find anything but was unable to see anything in the file aside from the 7zip.exe

Share this post


Link to post
Share on other sites

Sounds like the powershell is failing to even run. Make sure the computer has the latest version of powershell installed(PS5.1). I'm not sure what is required, but it does use a bunch of powershell, and I can see that causing a problem. You can also check the target machine's command history and see what the powershell command returned directly.

  • Like 1

Share this post


Link to post
Share on other sites
On 2/24/2020 at 1:46 PM, danialbulloch said:

Sounds like the powershell is failing to even run. Make sure the computer has the latest version of powershell installed(PS5.1). I'm not sure what is required, but it does use a bunch of powershell, and I can see that causing a problem. You can also check the target machine's command history and see what the powershell command returned directly.

okay, so I need to be able to work around this... any ideas?

Share this post


Link to post
Share on other sites

Check the command history of the computer you are running it on. If you open the script and click the debug button you can step through it step by step, watching what it does, and referencing the commands on the computer to see if it does things right. While also hand verifying for things like downloading the ISO.

  • Like 1

Share this post


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

Check the command history of the computer you are running it on. If you open the script and click the debug button you can step through it step by step, watching what it does, and referencing the commands on the computer to see if it does things right. While also hand verifying for things like downloading the ISO.

so went ahead and checked it does look like powershell is the issue, it says powershell 3 on the PC so i need to run something to update that, thanks

 

this is where it fails:
HKLM\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine:PSCompatibleVersion-Key Not Found

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.


×
×
  • Create New...