none
用户访问我的网站,可以获取用户当前系统的补丁吗? RRS feed

答案

  • 你好,

    浏览器处于安全的考虑,我们是得不到客户端的系统信息的。 不过可以通过下面的方法取得本机的补丁信息。 并通过HttpWebRequest 发送到你的网站 (需要写小程序在客户端让客户运行)。 

    注: 本方法也可以取服务器机器的补丁信息。

     string computer = ".";
                ManagementScope scope = new ManagementScope(@"\\" + computer + @"\root\cimv2");
                ManagementObjectSearcher quickFixes = new ManagementObjectSearcher(scope, new ObjectQuery("Select * from Win32_QuickFixEngineering"));
    
                foreach (ManagementObject quickFix in quickFixes.Get())
                {
                    Response.Write(string.Format("Description: {0, -20} ID: {1} <br/>", quickFix["Description"], quickFix["HotFixId"]));
                }

    Best regards,

    Zhanglong


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    2018年12月10日 8:11
    版主

全部回复

  • 你好,

    请问你的网站是用什么开发的,asp.net, java, 还是其他的技术? 另外用户当前系统的补丁,是指Windows版本信息,还是其他的什么东西?

    Best regards,

    Zhanglong


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    2018年12月7日 5:44
    版主
  • 肯定是asp.net写的web,当前系统补丁就是运行cmd,然后systeminfo的里面的系统补丁
    2018年12月10日 3:24
  • 你好,

    浏览器处于安全的考虑,我们是得不到客户端的系统信息的。 不过可以通过下面的方法取得本机的补丁信息。 并通过HttpWebRequest 发送到你的网站 (需要写小程序在客户端让客户运行)。 

    注: 本方法也可以取服务器机器的补丁信息。

     string computer = ".";
                ManagementScope scope = new ManagementScope(@"\\" + computer + @"\root\cimv2");
                ManagementObjectSearcher quickFixes = new ManagementObjectSearcher(scope, new ObjectQuery("Select * from Win32_QuickFixEngineering"));
    
                foreach (ManagementObject quickFix in quickFixes.Get())
                {
                    Response.Write(string.Format("Description: {0, -20} ID: {1} <br/>", quickFix["Description"], quickFix["HotFixId"]));
                }

    Best regards,

    Zhanglong


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    2018年12月10日 8:11
    版主