This project is read-only.

FYI

May 9, 2012 at 4:02 PM
Edited May 9, 2012 at 4:03 PM

For anyone struggling with this script, I was able to get it working by placing imagepatcher.ps1 in the same directory as the wim, otherwise it didn't seem to handle the file paths right.

I also ran into a problem with this part in the script:

 

$cabfile = Get-Item $scriptpath"\wsusscn2.cab"
write-debug "Expanding package.cab from wsusscn2.cab"
& $expandpath "$scriptpath\wsusscn2.cab" "$scriptpath\" "-f:package.cab"
write-debug "Expanding package.xml from package.cab"
& $expandpath "$scriptpath\package.cab" "$scriptpath\package.xml" "-f:package.xml"

 

I kept getting an error that it needed a directory for a multi file cab or something, and that the xml file did not exist in the debug messages. Indeed it didnt, neither did the package.cab. Once I changed...

"$scriptpath\" to "$scriptpath"

...things went fine.