Used this workaround:

https://support.microsoft.com/en-us/kb/2773898 

On Thursday, 6 October 2016 16:58:40 UTC+1, [email protected] wrote:
>
> Hi Guys,
>
> When I try to run either a .bat file or a .ps1 to install a Windows Hotfix 
> via Packer - the hotfix does not install and the subsequent logs show 
> ACCESS_DENIED.
>
> Script:
>
> *********************
> @echo off
> @powershell -NoProfile -ExecutionPolicy Bypass -Command "((new-object 
> net.webclient).DownloadFile('http://<URL REMOVED!>Update-3020369.msu', 
> 'C:\Windows\Temp\Windows6.1-KB3020369-x64.msu'))"
>
> set hotfix="C:\Windows\Temp\Windows6.1-KB3020369-x64.msu"
> if not exist %hotfix% goto :eof
>
> :: get windows version
> for /f "tokens=2 delims=[]" %%G in ('ver') do (set _version=%%G)
> for /f "tokens=2,3,4 delims=. " %%G in ('echo %_version%') do (set 
> _major=%%G& set _minor=%%H& set _build=%%I)
>
> :: 6.1
> if %_major% neq 6 goto :eof
> if %_minor% lss 1 goto :eof
>
> @echo on
> start /wait wusa "%hotfix%" /quiet /norestart 
> /log:C:\Windows\Temp\KB3020369.evt
>
> ***********************
>
> Error Message in the setup log:
>
> Windows update  could not be installed because of error 2147942405 "Access 
> is denied." (Command line: "wusa 
>  ""C:\Windows\Temp\Windows6.1-KB3020369-x64.msu"" /quiet /norestart 
> /log:C:\Windows\Temp\KB3020369.evt")
>
>
> This same script installs the hotfix successfully logged in locally as the 
> same user (Administrator).  
>
> Also  - I script the VMware Tools install in largely the same way - and 
> this works fine.
>
> Any ideas?
>
> Thanks,
>
> Dan
>
**********************************************************************
This email is confidential and may contain copyright material of the John Lewis 
Partnership. 
If you are not the intended recipient, please notify us immediately and delete 
all copies of this message. 
(Please note that it is your responsibility to scan this message for viruses). 
Email to and from the
John Lewis Partnership is automatically monitored for operational and lawful 
business reasons.
**********************************************************************

John Lewis plc
Registered in England 233462
Registered office 171 Victoria Street London SW1E 5NN
 
Websites: http://www.johnlewis.com 
http://www.waitrose.com 
http://www.johnlewis.com/insurance
http://www.johnlewispartnership.co.uk
 
**********************************************************************

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/34714b3d-f6fc-4167-a8fa-d8b6f8c595b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to