Running Windows Update through wuapi.dll

3.4k views Asked by At

I've added a reference to Interop.WUApiLib in my project, a console application. I'm trying to test out silently running updates on virtual machines but its not going so well. When I try to run the console app, it immediately crashed with the following error:

Unhandled Exception: System.IO.FileNotfoundEXception: Could not load file or assembly 'Interop.WUApiLib, Version=2.0.0.0, Culture=nuetral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. File name: 'Iterop.WUApiLib, Version=2.0.0.0, PublicKeyToken=null' at WindowsUpdateconsoleTest.Program.Main(String[] args)

I've checked the version on wuaueng1.dll and its 5.3.3790.5512, so WUA should be installed. I'm developing on Windows 7, the virtual machines are on Windows XP Service Pack 3. My local machine(which appears to run it fine is on a later version of wuapi.dll). Is that the issue? Or is something else going on?

I would really like to not have to call powershell scripts on these machines if I can avoid it.

0

There are 0 answers