none
Unable to download the windows update using script for Windows 10 from standard user RRS feed

  • General discussion

  • Hi,

    I have already posted the same query on other portal of Microsoft, below are the reference link :

    1 - https://social.technet.microsoft.com/Forums/en-US/ca04d816-c0c4-46bb-9ee5-852c1983db54/unable-to-download-the-windows-update-using-script-for-windows-10-from-standard-user?forum=win10itprogeneral&prof=required

    2 - https://answers.microsoft.com/en-us/windows/forum/windows_10-update/unable-to-download-the-windows-update-using-script/8cc0743a-cc63-4b4f-a833-63013df8d37a

    Now please allow me to explain again. 

    I am running Windows 2015 LTSB and use below script to download the Windows patches as and when required, below is link of reference code :
         
    https://msdn.microsoft.com/en-us/library/windows/desktop/aa387102(v=vs.85).aspx

    Previously the below script use to work from standard user, but from past few weeks it just shows the message as below (Only from standard user on windows 10):
    =====================================================
    Microsoft (R) Windows Script Host Version 5.812
    Copyright (C) Microsoft Corporation. All rights reserved.

    Searching for updates...

    List of applicable items on the machine:
    1> Microsoft Silverlight (KB4023307)
    2> 2018-05 Security Update for Adobe Flash Player for Windows 10 Version 1803 for x86-based Systems (KB4103729)
    3> Definition Update for Windows Defender Antivirus - KB2267602 (Definition 1.267.1773.0)

    Creating collection of updates to download:
    1> adding: Microsoft Silverlight (KB4023307)
    2> adding: 2018-05 Security Update for Adobe Flash Player for Windows 10 Version 1803 for x86-based Systems (KB4103729)
    3> adding: Definition Update for Windows Defender Antivirus - KB2267602 (Definition 1.267.1773.0)

    Downloading updates...
    C:\Users\normal user\Desktop\WindowsUpdate\windowsUpdate.vbs(67, 1) (null): 0x80240044
    =====================================================

    Windows Update Log just for reference :
    =====================================================
    2018/05/18 14:56:16.9913163 7836  3668  ComApi          Updates found = 5
    2018/05/18 14:56:16.9913177 7836  3668  ComApi          * END *   Search ClientId = MSDN Sample Script
    2018/05/18 14:56:16.9940363 7836  3712  ComApi          ISusInternal:: DisconnectCall failed, hr=8024000C
    2018/05/18 14:56:17.0056985 7836  3712  ComApi          * START *   Download ClientId = MSDN Sample Script
    2018/05/18 14:56:17.0056994 7836  3712  ComApi          Flags: 0X10016; Download priority: 3; Network Cost Policy: 4
    2018/05/18 14:56:17.0057008 7836  3712  ComApi          Updates in request: 5
    2018/05/18 14:56:17.0057177 7836  3712  ComApi          ServiceID = {9482F4B4-E343-43B6-B170-9A65BC822C77} Windows Update
    2018/05/18 14:56:17.0100163 7836  3712  ComApi          ISusInternal:: BeginDownloadUpdates failed, hr=80240044
    2018/05/18 14:56:17.0100510 7836  3712  ComApi          Exit code = 0x80240044
    2018/05/18 14:56:17.0100519 7836  3712  ComApi          * END *   Download ClientId = NULL
    =====================================================

    From the reference code :

    Set downloader = updateSession.CreateUpdateDownloader() 
    downloader.Updates = updatesToDownload
    downloader.Download() ----------------------> Seems broken for Standard user


    It seems downloader.Download() is behaving differently for Administrator and Standard user, specially on Windows 10 because same script is working fine on Windows 8.1

    As per my understanding it seems like some issue on Windows side, could anyone help me to provide workaround for same ? 
    • Edited by nishant.rai Saturday, June 2, 2018 2:44 AM
    • Changed type Bill_Stewart Sunday, July 29, 2018 11:28 PM
    • Moved by Bill_Stewart Sunday, July 29, 2018 11:28 PM This is not Windows update break/fix forum
    Saturday, June 2, 2018 2:40 AM

All replies

  • This is a duplicate of this question you posted more than a week ago:

    https://social.msdn.microsoft.com/Forums/en-US/ca04d816-c0c4-46bb-9ee5-852c1983db54/unable-to-download-the-windows-update-using-script-for-windows-10-from-standard-user?forum=win10itprogeneral

    We do not fix scripts you have found on the Internet.  The issue is clearly related to a compatibility with  Windows 10/2015.  I rcoammed contacting MS Support if this is important.

    Standard users cannot download updates. Only Admins can download and install updates.


    \_(ツ)_/

    Saturday, June 2, 2018 2:51 AM
  • >This is a duplicate of this question you posted more than a week ago:

    In first line of my this post I have shared two links where I had posted the same question, if you will read those forum, then you can understand people supported me to ask same question on different portals that's why I am here and posting the same query.

    >We do not fix scripts you have found on the Internet.  The issue is clearly related to a compatibility with  Windows 10/2015.  I rcoammed contacting MS Support if this is important.

    That is a sample code provided by Microsoft from "https://msdn.microsoft.com/en-us/library/windows/desktop/aa387102(v=vs.85).aspx" and my expectation is not that someone fix script, I am just interested in getting an workaround for same.

    >Standard users cannot download updates. Only Admins can download and install updates.

    Seriously ? This information is something new for me.


    Saturday, June 2, 2018 3:01 AM
  • Updates are downloaded into the Windows folder into a secure subfolder.  No standard users have write access to those folders.  It is possible to alter a system to give users access but W10 has made that even harder to prevent malware from accessing these critical folders.

    Standard users can trigger a normal update session but that is all.

    wuauclt.exe /detectnow /updatenow



    \_(ツ)_/

    Saturday, June 2, 2018 3:26 AM
  • Thank you very much for the information, but this answer is not related to my question.

    Windows will be became more vulnerable if standard user will restricted to download update because Microsoft frequently release security patches which are supposed to install in the system apart from admin or standard user role.

    Could you please check why below code is not working on W10 from standard user :

    ------------------------------------------

    Set downloader = updateSession.CreateUpdateDownloader() 
    downloader.Updates = updatesToDownload
    downloader.Download() 

    ------------------------------------------

    How we can prevent below error :

    ------------------------------------------

    Downloading updates...

    C:\Users\normal user\Desktop\WindowsUpdate\windowsUpdate.vbs(67, 1) (null): 0x80240044

    ------------------------------------------

    Please correct me in case my understanding is wrong.


    Saturday, June 2, 2018 3:53 AM
  • The command I just posted can be run by any user and it will trigger a download.

    In Windows we do not ask users to do updates.  They are scheduled by default in all current versions of Windows and the updates will be downloaded and installed automatically.

    The code you posted is a basic example of how to use the COM object to list updates and to do other system checks.  It is almost never needed in modern Windows as it is a leftover from early Windows 2000. 

    If you are having issues with downloads then contact MS Support to get assistance with fixing your system.

    Currently in Windows 10 systems many updates may not install even when selected.  There are many reasons for this as it is system specific.  It is not a scripting issue.


    \_(ツ)_/

    Saturday, June 2, 2018 4:33 AM
  • Note that the script you posted a link to has this warning attached:

    Important  This script is intended to demonstrate the use of the Windows Update Agent APIs, and provide an example of how developers can use these APIs to solve problems. This script is not intended as production code, and the script itself is not supported by Microsoft (though the underlying Windows Update Agent APIs are supported).


    \_(ツ)_/

    Saturday, June 2, 2018 4:38 AM
  • This is the text description of the  0x80240044 error message.

    You are receiving this error because the Windows Updater API requires elevated privileges.  Launching your script in an elevated command prompt should solve the issue.

    A standard user cannot run this and an administrator must run elevated.  This info is from Microsoft documents.


    \_(ツ)_/

    Saturday, June 2, 2018 4:47 AM
  • The command I just posted can be run by any user and it will trigger a download.

    I checked this command "wuauclt.exe /detectnow /updatenow" on Windows 10 and windows 8.1, it doesn't seems working because I am not getting any output and windows is not getting updated. Could you please check at your end as well ?

    >In Windows we do not ask users to do updates.  They are scheduled by default in all current versions of Windows and the updates will be downloaded and installed automatically.

    >The code you posted is a basic example of how to use the COM object to list updates and to do other system checks.  It is almost never needed in modern Windows as it is a leftover from early Windows 2000. 

    As per our requirement, we don't want to depend on scheduled update because whenever standard user logged into the system and try to access one particular application, that application checks that windows is up to date or not, in case it's not up to date it displays an error that windows in not updated please update first. For this reason we have decency on such script. 

    >If you are having issues with downloads then contact MS Support to get assistance with fixing your system.

    Noted.

    > It is not a scripting issue.

    Noted.


    Saturday, June 2, 2018 5:16 AM
  • Thanks for information.

    I strange thing which we noticed is that, the same script used to work from past more than 2 years but suddenly it stopped working from past few weeks. 

    Saturday, June 2, 2018 5:20 AM
  • If there are no updates available then nothing will happen.

    You need to hire a trained and certified Windows engineer to help you understand how this works and how to use it.

    You statement bout needing updates is incorrect as Windows will always update every day if an update is available.  No matter how often you try to trigger an update it will never do anything when no updates are available.

    The error is clear.  It is telling you that the update can only be done by an elevated Admin.

    Your issue with the app should be addressed to the app vendor.  It is not a Windows or a scripting issue.


    \_(ツ)_/

    Saturday, June 2, 2018 5:33 AM
  • If there are no updates available then nothing will happen.

    It's not like that, before posting comment here I first checked that is there any update available or not on my current system from standard user, that's why I requested you to please check the same at your end as well.

    >You need to hire a trained and certified Windows engineer to help you understand how this works and how to use it.

    Thanks for your suggestion and for sure I will recommend this thing as it will save my effort too :)

    Saturday, June 2, 2018 5:46 AM
  • Launching your script in an elevated command prompt should solve the issue.

    We have already tested the same, that also didn't worked out.

    > A standard user cannot run this and an administrator must run elevated.  This info is from Microsoft documents.

    This means this limitation is only applicable for windows 10 ?

    Saturday, June 2, 2018 6:02 AM
  • Launching your script in an elevated command prompt should solve the issue.

    We have already tested the same, that also didn't worked out.

    > A standard user cannot run this and an administrator must run elevated.  This info is from Microsoft documents.

    This means this limitation is only applicable for windows 10 ?

    All systems unless the system has been modified to allow this.


    \_(ツ)_/

    Saturday, June 2, 2018 6:16 AM
  • Thank you very much for your active support.

    All systems unless the system has been modified to allow this.

    I have a different opinion here, as I have mentioned previously, same sample script is working fine on windows 8.1 from standard user without any modification while same sample script is used to work on windows 10 from past more than 2 years. 

    As you have mentioned that this issue is not related to scripting. I was okay to execute suggested command wuauclt.exe /detectnow /updatenow but this also not working as per our expectation.

    If you could please suggested what is the exact setting needs to done for your suggestion "system has been modified to allow this" on windows 10 and will test the same,  it might resolve our problem.


    Saturday, June 2, 2018 6:53 AM
  • Jumping back one step, browse the Windows Update folder in the LGPE and notice the following options:

    • Allow non-administrators to receive update notifications: this setting will allow those users “to install all optional, recommended, and important content for which they have received a notification.” Note that if you enable this option, standard users will not only receive Windows Update notifications, they also won’t need elevated permissions to install most updates.

    It appears that GP has been set to allow users to install updates but now this policy has either been removed or GP is not working correctly.

    Contact MS Support for help troubleshooting your systems.  We cannot help you in this forum as it is for scripting questions and not help with fixing or using Group Policy.


    \_(ツ)_/

    Saturday, June 2, 2018 8:04 AM
  • Thank you very much for your kind support.

    Sure, will check and test the same and if required will contact MS support.

    Saturday, June 2, 2018 8:09 AM
  • >It appears that GP has been set to allow users to install updates but now this policy has either been removed or GP is not working correctly.

    I think you are correct, GP has some issue.

    Saturday, June 2, 2018 9:10 AM
  • This is not a Windows Update break/fix support forum.

    -- Bill Stewart [Bill_Stewart]

    Saturday, June 2, 2018 8:51 PM