Installing Updates

Topics: Archive - Deployment Scripts
Aug 11, 2014 at 9:26 PM
I am tasked with packaging IE9 in SCCM 2012 SP1. I am trying to use the commandline:

I get errors about file cannot be found. I can't seem to format the command properly so that the wusa.exe and the ccmcache folder are both found when installing.

Execute-Process -FilePath "C:\Windows\System32\wusa.exe" -Arguments "IE9-Windows6.1-KB2962872-x64.msu /quiet /norestart"

Any ideas?
Coordinator
Aug 12, 2014 at 8:33 PM
Hi, is the MSU in the files folder? If it is try prepending $dirFiles\ to the file path.
Aug 22, 2014 at 8:35 PM
Edited Aug 22, 2014 at 8:35 PM
To the filepath or the arguments? Can you please give me an example of how you would approach using a system utility such as wusa.exe to deploy MSU files? Wuas.exe is in system32 and the msu is in the files folder.

Thanks

P.S. Sorry, I would have replied sooner but I had emails going to the wrong account.
Coordinator
Sep 1, 2014 at 8:35 PM
Execute-Process -FilePath "C:\Windows\System32\wusa.exe" -Arguments "$dirFiles\IE9-Windows6.1-KB2962872-x64.msu /quiet /norestart" -WindowStyle Hidden
Sep 2, 2014 at 2:12 PM
Can %SYSTEM32% be used in place of C:\Windows\System32?

Thanks
Sep 2, 2014 at 2:46 PM
I would just define c:\windows\system32 as a variable if it's not built into powershell. Also Powersheller's line should work granted IE9-Windows6.1-KB2962872-x64.msu is in the ./files dir
Sep 2, 2014 at 3:36 PM
Hard coding the path is a recipe for failure. Just to make sure I will enumerate the system32 value and place it in a variable as you recommended.

I know I can do all this work on my own but nobody benefits from that work unless it's documented here.


Thanks
Coordinator
Sep 2, 2014 at 3:44 PM
There is already $envWinDir in the toolkit. You can use that as a base for System32 as the Windows folder is variable but System32 is not.

Regards, Dan

Sep 2, 2014 at 4:52 PM
I love it when a plan comes together. This would appear to be the proper commandline:
Execute-Process -FilePath "$envWinDir\wusa.exe" -Arguments "$dirFiles\IE9-Windows6.1-KB2962872-x64.msu /quiet /norestart" -WindowStyle Hidden

I will test and report back if successful. Hopefully this will help someone else.

Thanks
Dec 8, 2014 at 3:26 PM
what did you use for the detection method on this msu? just curious as I have one I would like to deploy out as well.

Thanks
Dec 19, 2014 at 4:21 PM
I've had success with patches MSPs, MSUs with just placing them in a folder and let install-msupdates do it's thing.

install-msupdates "$dirfiles\MSupdates"
Dec 19, 2014 at 4:29 PM
I am kind of late to the ballgame with the detection method answer but here is what I use:

Get-HotFix | Where-Object {$_.HotfixID -eq 'KBxxxxxxx'}

Obviously change the KB number to the one you are deploying, in my case KB2962872

Get-HotFix | Where-Object {$_.HotfixID -eq 'KB2962872'}
Dec 20, 2014 at 3:57 PM
Edited Dec 20, 2014 at 9:10 PM
Nice detection method.

Wouldn't the following achieve the same result?

Get-HotFix -id KB3013816
Dec 23, 2014 at 6:33 PM
Yes, but it wouldn't line up with the sample I plagiarized from my internet search result :-)
Dec 23, 2014 at 7:10 PM
I am now packaging IE11 for deployment and I plan to use the install-updates (as mentioned above) for the IE11 prereqs.
Dec 31, 2014 at 7:25 PM