Issues with the script

Coordinator
Jul 8, 2010 at 3:52 PM

If you have any problems or feature request, let me know

Jul 21, 2010 at 4:15 PM

Getting this error after it downloads wsusscn2.cab

"Unable to download static.xml and no downloaded found. Exitting..."

 

Very cool tool by the way!! this will save me a LOT of time when updating our master image.

Coordinator
Jul 21, 2010 at 4:59 PM
jaybird... this is caused by the connectivity issues to the hosting Workaround 1: try to run script one more time, script will connect again Workaround 2: try to download manually and put this xml to the folder where the script is located - download xml from here http://optimalizovane-it.cz/support/static.xml If there are connection problems (maybe DNS lookup or so) let me know. This xml contains updates that are not part of wsusscn2.cab I'll work on different download in the next version Glad to help with this tool
Nov 9, 2010 at 9:04 PM

I am running the following and it is not running at at all.  Will this not patch my custom wim images? 

".\imagepatcher.ps1 -imagefile:d:\ardmore_multipoint_005.wim -dbg:yes -patchimages:all"

Thanks,

Jason

Coordinator
Nov 11, 2010 at 8:33 AM
Edited Nov 12, 2010 at 6:29 PM

Jason,

are you getting some error messasges? If you are on TechEd Berlin you can stop by me to consult. If not send me an output from the powershell console. Script should work fine for custom images as well. As I see are you patching MultipointServer? Never tried before.

Ondrej.

Nov 15, 2010 at 3:41 PM

Sorry, Ondrej. 

I didn't have my execution policy set to allow unsigned. 

Thanks,

Jason

Nov 15, 2010 at 4:54 PM

I just ran through patching a Multipoint image and I got this error after adding 71 of 71 packages.

[==========================100.0%==========================]
Processing 71 of 71 - Adding package D:\imagepatcher\x64\window
3.msu
[==========================100.0%==========================]

Error: 0x800f081e

The specified package is not applicable to this image.
The specified package is not applicable to this image.
The specified package is not applicable to this image.
The specified package is not applicable to this image.
The command completed with errors.
For more information, refer to the log file.

The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Image File : d:\ardmore_multipoint_011.wim
Image Index : 1
Saving image
[==========================100.0%==========================]
Unmounting image
[==========================100.0%==========================]
The operation completed successfully.

After looking at the DISM log I found many of these: CBS    Failed to find servicing stack directory in online store. [HRESULT = 0x80070490 - ERROR_NOT_FOUND]

And this at the end:  DISM   DISM Package Manager: PID=6416 Failed while processing command add-package. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x800f081e)
The size is bigger how would I know if the Image is OK? 

Jason

 

Coordinator
Nov 16, 2010 at 8:23 AM

Hi Jason,

the script downloads all the updates for win 6.1 so it means all the flavors of the win7 and r2 server and tries to apply to the images. There is no logic how to check if the update is applicable to the particular image in the wim or not. From this point of view script is leveraging DISM logic that checks if the update is valid for particular image. I never seen Multipoint server before so I'm unable to check if there is something specific for it. If just few updates failed it means that rest of updates was applied.

There is only one way how to check is to install image and check for the updates. Image will be ok always - again this "hard work" is done by DISM :) If there is (should be) something wrong it will be wrong by the manual way as well.

I'll try to get multipoint server to check it out. Please let me know if updates are in your image and the image works fine. AFAIK Multipoint is sold as an OEM and never seen this on MSDN / Technet - I'll check this out again next week.

On 15 Nov 2010 08:54:40 -0800, oliphanj wrote
>
> From: oliphanj
>
> I just ran through patching a Multipoint image and I got this error after adding 71 of 71 packages.
> [==========================100.0%==========================]
> Processing 71 of 71 - Adding package D:\imagepatcher\x64\window
> 3.msu
> [==========================100.0%==========================]
> Error: 0x800f081e
> The specified package is not applicable to this image.
> The specified package is not applicable to this image.
> The specified package is not applicable to this image.
> The specified package is not applicable to this image.
> The command completed with errors.
> For more information, refer to the log file.
> The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
> Deployment Image Servicing and Management tool
> Version: 6.1.7600.16385
> Image File : d:\ardmore_multipoint_011.wim
> Image Index : 1
> Saving image
> [==========================100.0%==========================]
> Unmounting image
> [==========================100.0%==========================]
> The operation completed successfully.
> After looking at the DISM log I found many of these: CBS Failed to find servicing stack directory in online store. [HRESULT = 0x80070490 - ERROR_NOT_FOUND]
> And this at the end: DISM DISM Package Manager: PID=6416 Failed while processing command add-package. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x800f081e)
> The size is bigger how would I know if the Image is OK?
> Jason
>
>
> Read the full discussion online.
> To add a post to this discussion, reply to this email (imagepatcher@discussions.codeplex.com)
> To start a new discussion for this project, email imagepatcher@discussions.codeplex.com
> You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
> Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Ondrej
Nov 17, 2010 at 4:27 PM

Ondrej,

I ran it on a Custom Win 7 x86 image as well and got the same messages at the end.  Is this because those other patches that are x64 fail to apply? 

Have you seen this?  http://blogs.technet.com/b/heyscriptingguy/archive/2010/11/14/use-powershell-to-patch-vhd-and-wim-image-files.aspx

I have got 2 updated wim's now I just need the time to test them. 

Thanks,

Jason

Coordinator
Nov 18, 2010 at 8:44 AM

Jason,
the error messages correlates to the fact I mentioned before - not all x86/x64 are applicable to every image (let's say update for Hyper-V will not install on Win7, update for Ultimate feature will not install on Pro,...). Checks are performed by the DISM as I mentioned before - if you want to integrate patch which is not valid for the specific image inside wim/vhd DISM will fail with error on that particular update. Updates for x86/x64 are downloaded and injected separately - script checks architecture and takes only "architecture relevant" updates (in other words - x86 patches goes only to the x86 images and vice versa).

I have seen the script and it is the pretty similar as imagepatcher but imagepatcher downloads updates for you (and mine is little bit "older" :))) and can patch all the images in wim.

I'm planning some updates to the script so if you have some ideas let mi know (like drivers,...)

On 17 Nov 2010 08:27:24 -0800, oliphanj wrote
>
> From: oliphanj
>
> Ondrej,
> I ran it on a Custom Win 7 x86 image as well and got the same messages at the end. Is this because those other patches that are x64 fail to apply?
> Have you seen this? http://blogs.technet.com/b/heyscriptingguy/archive/2010/11/14/use-powershell-to-patch-vhd-and-wim-image-files.aspx
> I have got 2 updated wim's now I just need the time to test them.
> Thanks,
> Jason

Ondrej
Nov 18, 2010 at 3:35 PM

Ondrej,

Thanks for the help, it is very nice to get support on something like this that is such a great tool. 

I do have 2 requests. 

-A GUI would be really cool, I don't mind using the command line because it is so easy but my techs who I would like to do the updating would really like it. 

-Can you allow the app to patch all wim's in a folder?   Like this?  ".\imagepatcher.ps1 -imagefile:d:\Images\*.wim

I use SCCM for deployment that pushes drivers, but as long as it was an option I could see where it would be useful to update the drivers that were on your wim.   

The last Wim I updated only took 10 minutes because the patches were all downloaded already.  Small image too 5.6gb.

Thanks again,

Jason

Nov 29, 2010 at 3:07 PM

Ondrej,

Another question.  The custom image I had applied imagerpatcher worked but I found it still needed some updates.

Before image patcher the image needed 45 updates.  After image patcher it needed 21.  This image has office 2010 and latest .net.

Is there a way to apply office and .net patches as well?  It looks like it still had a couple win7 patches that weren't included, why would this be? 

Thanks,

Jason

Coordinator
Nov 29, 2010 at 4:07 PM

Hello Jason,

Let’s divide question to 2 parts:

1. patching non Windows updates like Office,… - this is not possible as far as DISM supports only OS updates. Any application updates (not sure about .net) must be installed in the running OS.

2. Missing patches – some updates are not present in the cab file downloaded from Microsoft so script is downloading another xml called static updates. This xml is edited by me but not updated for 2 months now (sorry I’m very busy right now). Please send me missing updates (print screen or C:\windows\WindowsUpdate.log in the attachment directly to me – do not reply to the discussion – ondrejv {at} optimalizovane-it.cz) I’ll try to proceed ASAP.

Hope it will help.

Ondrej

Nov 29, 2010 at 7:26 PM
Here is the additional updates needed to the image I am working on. I have included a screen shot and windowsupdate.log. The static xml looks pretty easy if I were to keep this up to date where would I get the path to the patches?

Thanks,
Jason


From: [email removed]
To: [email removed]
Date: Mon, 29 Nov 2010 08:07:20 -0800
Subject: Re: Issues with the script [imagepatcher:218781]

From: ondrejv
Hello Jason,
Let’s divide question to 2 parts:

1. patching non Windows updates like Office,… - this is not possible as far as DISM supports only OS updates. Any application updates (not sure about .net) must be installed in the running OS.

2. Missing patches – some updates are not present in the cab file downloaded from Microsoft so script is downloading another xml called static updates. This xml is edited by me but not updated for 2 months now (sorry I’m very busy right now). Please send me missing updates (print screen or C:\windows\WindowsUpdate.log in the attachment directly to me – do not reply to the discussion – ondrejv {at} optimalizovane-it.cz) I’ll try to proceed ASAP.


Hope it will help.

Ondrej
Read the full discussion online.
To add a post to this discussion, reply to this email (imagepatcher@discussions.codeplex.com@discussions.codeplex.com)
To start a new discussion for this project, email imagepatcher@discussions.codeplex.com@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
Coordinator
Nov 29, 2010 at 8:22 PM

Jason,

Usually using WindowsUpdate.log to get correct paths. Now I checked updates again some of them seems to require Genuine validation so will check the possibility for download.

Ondrej

From: oliphanj [mailto:notifications@codeplex.com]
Sent: Monday, November 29, 2010 8:27 PM
To: ondrejv@optimalizovane-it.cz
Subject: Re: Issues with the script [imagepatcher:218781]

From: oliphanj

Here is the additional updates needed to the image I am working on. I have included a screen shot and windowsupdate.log. The static xml looks pretty easy if I were to keep this up to date where would I get the path to the patches?

Thanks,
Jason


From: [email removed]
To: [email removed]
Date: Mon, 29 Nov 2010 08:07:20 -0800
Subject: Re: Issues with the script [imagepatcher:218781]

From: ondrejv

Hello Jason,
Let’s divide question to 2 parts:

1. patching non Windows updates like Office,… - this is not possible as far as DISM supports only OS updates. Any application updates (not sure about .net) must be installed in the running OS.

2. Missing patches – some updates are not present in the cab file downloaded from Microsoft so script is downloading another xml called static updates. This xml is edited by me but not updated for 2 months now (sorry I’m very busy right now). Please send me missing updates (print screen or C:\windows\WindowsUpdate.log in the attachment directly to me – do not reply to the discussion – ondrejv {at} optimalizovane-it.cz) I’ll try to proceed ASAP.


Hope it will help.

Ondrej

Read the full discussion online.
To add a post to this discussion, reply to this email (imagepatcher@discussions.codeplex.com@discussions.codeplex.com)
To start a new discussion for this project, email imagepatcher@discussions.codeplex.com@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com

Read the full discussion online.

To add a post to this discussion, reply to this email (imagepatcher@discussions.codeplex.com@discussions.codeplex.com)

To start a new discussion for this project, email imagepatcher@discussions.codeplex.com@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com

Jan 16, 2011 at 5:34 PM

Whenever I try to run this from a command line I get this error

 

========================================================

C:\DeploymentShare\ImagePatcher\imagepatcher.ps1 : A positional parameter cannot be found that accepts argument 'Systems\Win7_ENT_x86\Win7_ENT_x86.wim'.
At line:1 char:19
+ .\imagepatcher.ps1 <<<<  -imagefile:C:\DeploymentShare\Operating Systems\Win7_ENT_x86\Win7_ENT_x86.wim -dbg:yes -patchimages:all
    + CategoryInfo          : InvalidArgument: (:) [imagepatcher.ps1], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,imagepatcher.ps1

========================================================

 

This is the command I used: .\imagepatcher.ps1 -imagefile:"C:\DeploymentShare\Operating Systems\Win7_ENT_x86\Win7_ENT_x86.wim" -dbg:yes -patchimages:"all"

According to your notes this should work. Also if I just right click and "Run In PowerShell" then enter the full filename there it works.

I would like this scriptable so that I can run this as a scheduled task every Tuesday (Patch Tuesday)

 

Can you help?

Thanks ~djekl

Coordinator
Jan 16, 2011 at 8:14 PM

Hi djekl,

error you’re describing is caused when not using quotes in the path. I’m sure that command you sent is not same that caused and error.

Try to copy paste command from your email to the psh console – it should work.

Example:

Generates an error: .\imagepatcher.ps1 -imagefile:C:\DeploymentShare\Operating Systems\Win7_ENT_x86\Win7_ENT_x86.wim -dbg:yes -patchimages:all

Works fine: .\imagepatcher.ps1 -imagefile:"C:\DeploymentShare\Operating Systems\Win7_ENT_x86\Win7_ENT_x86.wim" -dbg:yes -patchimages:all

If you want to schedule – remember to run elevated.

Let me know, Ondrej

Oct 23, 2012 at 10:00 AM
Edited Oct 23, 2012 at 10:03 AM

Hi,

I'm french,

Excuse me for my bad English,

When I try :

./imagepatcher.ps1 -dbg:yes -imagefile:"E:\aio\build\sources\install.vim" -patchimages:"all"

All downloads are ok, but when the update :

windows6.1-kb2507618-x64_8c21e98dfa8f77c40152e8f5d392c5278a7a7c8e.cab

I've got this error :

Write-Error : sorry not knowfile type
Au niveau de C:\Users\Piou\Downloads\imagepatcher.ps1 : 446 Caractère : 16
+        write-error <<<< "sorry not knowfile type"
       + CategoryInfo               : NotSpecified (:) [Write-Error], WriteErrorException
       + FullyQualifiedErrorId    : Microsoft.PowerShell.Commands.WriteErrorException,Microsoft.PowerShell.Commands.WriteErrorCommand

Can you help me ?

Oct 23, 2012 at 2:34 PM
I am sorry I haven't used this product in a while but your command line looks correct besides having "vim" rather than "wim".
Jason


From: [email removed]
To: [email removed]
Date: Tue, 23 Oct 2012 02:01:02 -0700
Subject: Re: Issues with the script [imagepatcher:218781]

From: Piou593
Hi,
I'm french,
Excuse me for my bad English,
When I try :
./imagepatcher.ps1 -dbg:yes -imagefile:"E:\aio\build\sources\install.vim" -patchimages:"all"
All downloads are ok, but when the update :
windows6.1-kb2507618-x64_8c21e98dfa8f77c40152e8f5d392c5278a7a7c8e.cab
I've got this error :
Write-Error : sorry not knowfile type
Au niveau de C:\Users\Piou\Downloads\imagepatcher.ps1 : 446 Caractère : 16
+ write-error <<< + CategoryInfo : NotSpecified (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Microsoft.PowerShell.Commands.WriteErrorCommand
Can you help me ?
Read the full discussion online.
To add a post to this discussion, reply to this email (imagepatcher@discussions.codeplex.com)
To start a new discussion for this project, email imagepatcher@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com