RE: CLR 1.1 SP1 destroys System.Management code
From: Blair Neumann [MSFT] (blairn_at_online.microsoft.com)
Date: 10/11/04
- Next message: Blair Neumann [MSFT]: "RE: .NET Framework issues"
- Previous message: Phil Wilson: "Re: How can I add the Net Framework to the setup Project?"
- In reply to: Manfred Braun: "CLR 1.1 SP1 destroys System.Management code"
- Next in thread: Manfred Braun: "Re: CLR 1.1 SP1 destroys System.Management code"
- Reply: Manfred Braun: "Re: CLR 1.1 SP1 destroys System.Management code"
- Reply: Manfred Braun: "RE: CLR 1.1 SP1 destroys System.Management code"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 11 Oct 2004 22:34:25 GMT
Hello Manfred.
Sorry to hear about your problems running System.Management code on NDP 1.1
SP1! Unfortunately, I cannot assist you in debugging your application.
However you also asked how to remove NDP 1.1 SP1 which is something that I
may be able to help you with. As you observe, it's not as simple as
Add/Remove Programs.
Note that what you call CLR 1.1, I call NDP 1.1. I believe we are talking
about the same thing: the .NET Framework 1.1 and its associated Service
Pack 1.
Assuming you are running on a platform other than Windows Server 2003, NDP
1.1 SP1 will not show up in Add/Remove Programs. (If you are running on
32-bit versions of Windows Server 2003 then NDP 1.1 SP1 should be in
Add/Remove Programs as "KB867460". You can simply uninstall it there.)
Instead, you can revert to pre-SP1 levels by uninstalling the .NET
Framework from Add/Remove Programs and then re-installing the .NET
Framework. Unfortunately, we do not support the explicit uninstall of .NET
Framework service packs except on specific platforms such as Windows Server
2003 (these platforms contain the .NET Framework as pre-installed Windows
components); you must uninstall the .NET Framework itself, then re-install
it without re-installing the Service Pack. In this case, you would simply
uninstall and then re-install the .NET Framework 1.1.
You can get the .NET Framework 1.1 from this URL:
http://www.microsoft.com/downloads/details.aspx?FamilyID=262d25e3-f589-4842-
8157-034d1e7cf3a3&displaylang=en
Note that you must also re-install any hotfixes that you may have had after
re-installing the .NET Framework. Many customers do not have any .NET
Framework hotfixes installed, but if you do then you will need to replace
them. Unlike service packs, .NET Framework hotfixes do show up in
Add/Remove programs, so you can see which NDP 1.1 hotfixes you have
installed by checking Add/Remove Programs prior to uninstalling .NET
Framework 1.1. .NET Framework hotfix entries in Add/Remove Programs
typically look like this: "Microsoft .NET Framework 1.1 Hotfix (KBxxxxxx)".
If you do not still have the hotfix executable for re-install, you should
be able to get it again from the same source who provided it for you the
first time: for example, from your OEM or from the Microsoft Download
Center (http://www.microsoft.com/downloads).
I hope this helps!
Best wishes.
-Blair.
--------------------
> Subject: CLR 1.1 SP1 destroys System.Management code
> Date: Sat, 9 Oct 2004 07:03:05 -0700
>
> Hi All,
> after I installed the SP1 on CLR1.1, my code using System.Management is
no
> longer working. My code worked the whole time until SP1 and is as follows:
>
> //mewSP1Test1.cs
>
> using System;
> using System.Management;
>
> public class Test
> {
>
> public static void Main()
> {
> ManagementEventWatcher mew;
> ConnectionOptions co;
> ManagementPath mp;
> ManagementScope ms;
> WqlEventQuery weq;
>
> co = new ConnectionOptions();
> co.EnablePrivileges = true;
>
> co.Impersonation = ImpersonationLevel.Impersonate;
> co.Authentication = AuthenticationLevel.Connect;
>
> mp = new ManagementPath();
> mp.NamespacePath = @"\root\cimv2";
> mp.Server = "m1";
>
> ms = new ManagementScope(mp, co);
>
> weq = new WqlEventQuery("select * from __InstanceCreationEvent where
> (TargetInstance isa 'Win32_NTLogEvent') and (TargetInstance.Logfile <>
> 'Security')");
>
> mew = new ManagementEventWatcher(ms, weq);
> mew.EventArrived += new
EventArrivedEventHandler(OnEventlogEventArrived);
> mew.Start();
> Console.WriteLine("Waiting for events....");
> Console.ReadLine();
> }
>
> private static void OnEventlogEventArrived(object sender,
> EventArrivedEventArgs e)
> {
> //This is the eventhandler for the returned WMI results.
>
> string msg;
>
>
> //Get the wmi-event
>
> ManagementBaseObject mbo;
> mbo = (ManagementBaseObject)e.NewEvent["TargetInstance"];
>
> try
> {
> msg = ((string) mbo["Message"]).Trim();
> Console.WriteLine(msg);
> }
> catch(Exception ex)
> {
> Console.WriteLine("Exception:{0}", ex.ToString());
> }
>
> Console.WriteLine(new String('-', 79));
> }
>
> }
>
> How to fix the bug?
> How to uninstall SP1, it is not listed under software!
>
> Any help would be wonderful!
> Thanks and best regards,
> Manfred Braun
>
-- This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
- Next message: Blair Neumann [MSFT]: "RE: .NET Framework issues"
- Previous message: Phil Wilson: "Re: How can I add the Net Framework to the setup Project?"
- In reply to: Manfred Braun: "CLR 1.1 SP1 destroys System.Management code"
- Next in thread: Manfred Braun: "Re: CLR 1.1 SP1 destroys System.Management code"
- Reply: Manfred Braun: "Re: CLR 1.1 SP1 destroys System.Management code"
- Reply: Manfred Braun: "RE: CLR 1.1 SP1 destroys System.Management code"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|