Hello friends
I need your help in WUAPI.dll for automatic update.
I have a project to search for updates in localintranet and get the updates and install them.
i can not find any help for WUAPI on the msdn and how to use it
Please help me with that
Printable View
Hello friends
I need your help in WUAPI.dll for automatic update.
I have a project to search for updates in localintranet and get the updates and install them.
i can not find any help for WUAPI on the msdn and how to use it
Please help me with that
Welcome to the Forums.
Here is a link to the wuapi.dll overview on MSDN.
Windows Update Agent API
And below that topic is how to use the wuapi.dll
HTH
Thank you for replying
But in fact i need a sample source code about this subject and i do not want vbscript, i need it pure vb to use it with application
To start, add a reference to the wuapi.dll to a new vb standard exe project.
Then explore the methods and properties available using the Object Browser (F2).
I guess its just going to be trial and error.
I was boared so I started on a small example for you.
This works for SUS version 2.0 and you can check out this link for determining the version.
VB Code:
Option Explicit 'Add reference to wuapi.dll in the system32 directory 'Valid only for Windows 2000 SP3+ Private Enum ausid ausidEveryDay = 0 ausidEverySunday = 1 ausidEveryMonday = 2 ausidEveryTuesday = 3 ausidEveryWednesday = 4 ausidEveryThursday = 5 ausidEveryFriday = 6 ausidEverySaturday = 7 End Enum Private Enum aunl aunlNotConfigured = 0 aunlDisabled = 1 aunlNotifyBeforeDownload = 2 aunlNotifyBeforeInstallation = 3 aunlScheduledInstallation = 4 End Enum Private Sub Command1_Click() Dim oUP As WUApiLib.AutomaticUpdates Dim oUPSearcher As UpdateSearcher Dim sLevel As String Dim sDay As String Dim sTime As String Set oUP = New AutomaticUpdates 'oUP.ShowSettingsDialog 'Uncomment if you want to display the dialog oUP.EnableService MsgBox "Service enabled: " & oUP.ServiceEnabled Select Case oUP.Settings.NotificationLevel Case 0 sLevel = "Not Configured" Case 1 sLevel = "Disabled" Case 2 sLevel = "Notify Before Download" Case 3 sLevel = "Notify Before Installation" Case 4 sLevel = "Scheduled Installation" End Select Select Case oUP.Settings.ScheduledInstallationDay Case 0 sDay = "Every Day" Case 1 sDay = "Every Sunday" Case 2 sDay = "Every Monday" Case 3 sDay = "Every Tuesday" Case 4 sDay = "Every Wednesday" Case 5 sDay = "Every Thursday" Case 6 sDay = "Every Friday" Case 7 sDay = "Every Saturday" End Select Select Case oUP.Settings.ScheduledInstallationTime Case 0 sTime = "12:00 AM" Case Else sTime = oUP.Settings.ScheduledInstallationTime & ":00" sTime = Format(sTime, "hh:mm AMPM") End Select MsgBox "Service is " & sLevel & " for: " & vbNewLine & sDay & vbNewLine & sTime Set oUPSearcher = New UpdateSearcher MsgBox "Searcher On-Line: " & oUPSearcher.Online Set oUPSearcher = Nothing Set oUP = Nothing End Sub
Thank you
But the problem is when berforming the method search or began search
it doesn't work well and also the install method
try that
thanks
Where are you friends???
No one can help me :ehh: :mad: :mad: