|
-
Jan 3rd, 2005, 08:27 AM
#1
Thread Starter
New Member
WUAPI Help
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
-
Jan 3rd, 2005, 02:24 PM
#2
Re: WUAPI Help
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
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 4th, 2005, 01:35 AM
#3
Thread Starter
New Member
Re: WUAPI Help
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
-
Jan 4th, 2005, 02:52 PM
#4
Re: WUAPI Help
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 4th, 2005, 03:44 PM
#5
Re: WUAPI Help
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
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 5th, 2005, 07:33 AM
#6
Thread Starter
New Member
Re: WUAPI Help
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
-
Jan 13th, 2005, 01:36 AM
#7
Thread Starter
New Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|