Visual Studio | Windows Updates auslesen und runterladen

  • Heyho Leute. Ich versuch seit ner Zeit einen Windows Updater aus Langeweile zu Programmieren.
    Leider hab ich das Problem wenn ich das Programm debugge bekomm ich in Visual Studio die Meldung:

    Code
    System.UnauthorizedAccessException


    Habe versucht das Programm mit Administrator zu öffnen bekomme aber die Meldung:

    Code
    Informationen über das Aufrufen von JIT-Debuggenanstelle dieses Dialogfelds finden Sie am Ende dieser Meldung.************** Ausnahmetext **************System.IO.FileNotFoundException: Das System kann die angegebene Datei nicht finden. (Ausnahme von HRESULT: 0x80070002)   bei Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)   bei Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)   bei WindowsApplication3.Form1.Button1_Click(Object sender, EventArgs e) in c:\users\codex\documents\visual studio 2013\Projects\WindowsApplication3\WindowsApplication3\Form1.vb:Zeile 12.   bei System.Windows.Forms.Control.OnClick(EventArgs e)   bei System.Windows.Forms.Button.OnClick(EventArgs e)   bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)   bei System.Windows.Forms.Control.WndProc(Message& m)   bei System.Windows.Forms.ButtonBase.WndProc(Message& m)   bei System.Windows.Forms.Button.WndProc(Message& m)   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)************** Geladene Assemblys **************mscorlib    Assembly-Version: 4.0.0.0.    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll.----------------------------------------WindowsApplication3    Assembly-Version: 1.0.0.0.    Win32-Version: 1.0.0.0.    CodeBase: file:///C:/Users/CodeX/Documents/Visual%20Studio%202013/Projects/WindowsApplication3/WindowsApplication3/bin/Debug/WindowsApplication3.exe.----------------------------------------Microsoft.VisualBasic    Assembly-Version: 10.0.0.0.    Win32-Version: 11.0.50938.18408 built by: FX451RTMGREL.    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll.----------------------------------------System    Assembly-Version: 4.0.0.0.    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll.----------------------------------------System.Core    Assembly-Version: 4.0.0.0.    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll.----------------------------------------System.Windows.Forms    Assembly-Version: 4.0.0.0.    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.----------------------------------------System.Drawing    Assembly-Version: 4.0.0.0.    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.----------------------------------------System.Runtime.Remoting    Assembly-Version: 4.0.0.0.    Win32-Version: 4.0.30319.34108 built by: FX45W81RTMGDR.    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll.----------------------------------------mscorlib.resources    Assembly-Version: 4.0.0.0.    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_de_b77a5c561934e089/mscorlib.resources.dll.----------------------------------------System.Windows.Forms.resources    Assembly-Version: 4.0.0.0.    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.----------------------------------------************** JIT-Debuggen **************Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in derKonfigurationsdatei der Anwendung oder des Computers(machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms festgelegt werden.Die Anwendung muss mit aktiviertem Debuggen kompiliert werden.Zum Beispiel:<configuration>    <system.windows.forms jitDebugging="true" /></configuration>Wenn das JIT-Debuggen aktiviert ist, werden alle Ausnahmefehler an den JIT-Debugger gesendet, der auf demComputer registriert ist, und nicht in diesem Dialogfeld behandelt.


    Mein Code:


    Hab das von der Seite: Klick mich von einem VB Skript in ein VB Programm umzuschreiben.
    Vielleicht kann mir da jemand helfen..

    "Imagine if the government went after corruption as hard as it goes after guys who run filesharing sites. Priorities. " - @Snowden
    "More worrying than FBI temporarily running a server that contained child porn, is hacking computers anywhere in the world with one warrant" - @josephfcox