Danke für die Antwort,nein es sind msu und cab Dateien sind Standalone Dateien und werden mit wusa installiert
Beiträge von Holzmichel
-
-
Hallo an alle ich habe ein Programm in VB6 das alle Updates in einem Ordner (msu Dateien) installiert, meine Frage kann man sowas auch in Autoit machen wäre viel einfacher weil man ja da nicht die ganzen Runtimes liefern muss
Einfaches GUI mit Ordner auswählen und dann sollen alle darin befindlichen msu Dateien nacheinander installiert werden
habt ihr eine Idee wie man das in Autoit umsetzen kann ????
Danke für eure Hilfe
-
Hallo suche eine Möglichkeit das Programm winSAT.exe in cmd auszuführen und die Ergebnisse in einem Edit Control anzuzeigen
Folgende befehle sollten ausgeführt werden
winsat disk -seq -read -drive c
winsat disk -seq -write -drive cKann mir da jemand helfen ?
P.S: geht ja auch als Batch brauche es aber in Autoit
-
Hi danke erstmal für deine sehr gute Hilfe aber da ich immer noch am versuchen bin und es einfach nicht klappen.
Spoiler anzeigen
Func _AgreeLicense($searchResult)
Local $update, $aIndex = _GUICtrlListView_GetSelectedIndices($hListview, True)
If $aIndex[0] = 0 Then Return
For $i = 1 To $aIndex[0]
If _GUICtrlListView_GetItemText($hListview, $aIndex[$i], 1) = 'click to agree' Then
$update = $searchResult.Updates.Item($i-1)
If MsgBox(36, 'LIZENZ-OK', $update.EulaText) = 6 Then
_GUICtrlListView_SetItemText($hListview, $aIndex[$i], 'agree', 1)
_AgreeLicense($update)
_WinAPI_RedrawWindow($hListview)
EndIf
EndIf
Next
EndFuncFunc _CollectUpdates($searchResult)
Local $updatesToDownload = ObjCreate("Microsoft.Update.UpdateColl")
Local $sText, $iCount = _GUICtrlListView_GetItemCount($hListview)
If $iCount = 0 Then Return
For $i = 0 To $iCount -1
$sText = _GUICtrlListView_GetItemText($hListview, $i, 1)
If ($sText = 'agree' Or $sText = ' --') And _GUICtrlListView_GetItemChecked($hListview, $i) Then $updatesToDownload.Add($searchResult.Updates.Item($i))
Next
If $updatesToDownload.Count = 0 Then
Return SetError(1,0,0)
Else
Return $updatesToDownload
EndIfEndFunc
Habe es versucht klappt nicht leider, und bei der Funktion _AgreeLicense weis ich nicht wo ich was eintragen soll. und bei
Spoiler anzeigen
- While 1
- Switch GUIGetMsg()
- Case -3
- Exit
- Case $idListview
- _AgreeLicense() <-----------------------------------Hier sind zu wenig Argumente sagt die Fehlermeldung
- Case ... Button 'Prüfen auf Updates'
- $oUpdates = _CheckAvailableUpdates()
- If @error Then
- MsgBox(0, 'Error', 'No updates available.')
- Else
- _ShowUpdatesInListview($idListview, $oUpdates)
- EndIf
- Case ... Button 'Updates durchführen'
- $oToUpdate = _CollectUpdates($oUpdates)
- If Not @error Then _RunUpdates($oToUpdate)
- EndSwitch
- WEnd
Verzweifel
-
Danke das habe ich übersehen cool, besteht die Möglichkeit nur bestimmte Updates zu installieren ?
-
Super Danke nur eines verstehe ich nicht wo soll ich den
_AgreeLicense()
eintragen ????
Habe ich was übersehen ?
-
Hi alle
es geht um folgendes Script Schnipsel
Spoiler anzeigen
For $i = 0 To $searchResult.Updates.Count-1$update = $searchResult.Updates.Item($i)
Wie kann ich hier das Ergebnis in ein Listview ausgeben mit einem Icon von der Shell32.dll ???
Wäre Toll wenn mir jemand dabei helfen könnte.
-
SUPER
danke dir habe es gerade getestet und es macht was es soll einfach Klasse, nun hätte ich noch eine Frage habe alles was ConsoleWrite ist in meiner Form in die Statusbar geschrieben, wie kann ich nun nur noch anzeigen lassen in einem Listview was für Updates gefunden wurden und welche installiert werden können. -
Hallo
wer kann mir bei diesem VBS Script bei der Übersetzung helfen damit ich es in Autoit in eine GUI einbinden kann (einfacher weil man dann sehen kann was passiertSpoiler anzeigen
Set updateSession = CreateObject("Microsoft.Update.Session")
updateSession.ClientApplicationID = "MSDN Sample Script"Set updateSearcher = updateSession.CreateUpdateSearcher()
WScript.Echo "Searching for updates..." & vbCRLF
Set searchResult = _
updateSearcher.Search("IsInstalled=0 and Type='Software' and IsHidden=0")WScript.Echo "List of applicable items on the machine:"
For I = 0 To searchResult.Updates.Count-1
Set update = searchResult.Updates.Item(I)
WScript.Echo I + 1 & "> " & update.Title
NextIf searchResult.Updates.Count = 0 Then
WScript.Echo "There are no applicable updates."
WScript.Quit
End IfWScript.Echo vbCRLF & "Creating collection of updates to download:"
Set updatesToDownload = CreateObject("Microsoft.Update.UpdateColl")
For I = 0 to searchResult.Updates.Count-1
Set update = searchResult.Updates.Item(I)
addThisUpdate = false
If update.InstallationBehavior.CanRequestUserInput = true Then
WScript.Echo I + 1 & "> skipping: " & update.Title & _
" because it requires user input"
Else
If update.EulaAccepted = false Then
WScript.Echo I + 1 & "> note: " & update.Title & _
" has a license agreement that must be accepted:"
WScript.Echo update.EulaText
WScript.Echo "Do you accept this license agreement? (Y/N)"
strInput = WScript.StdIn.Readline
WScript.Echo
If (strInput = "Y" or strInput = "y") Then
update.AcceptEula()
addThisUpdate = true
Else
WScript.Echo I + 1 & "> skipping: " & update.Title & _
" because the license agreement was declined"
End If
Else
addThisUpdate = true
End If
End If
If addThisUpdate = true Then
WScript.Echo I + 1 & "> adding: " & update.Title
updatesToDownload.Add(update)
End If
NextIf updatesToDownload.Count = 0 Then
WScript.Echo "All applicable updates were skipped."
WScript.Quit
End If
WScript.Echo vbCRLF & "Downloading updates..."Set downloader = updateSession.CreateUpdateDownloader()
downloader.Updates = updatesToDownload
downloader.Download()Set updatesToInstall = CreateObject("Microsoft.Update.UpdateColl")
rebootMayBeRequired = false
WScript.Echo vbCRLF & "Successfully downloaded updates:"
For I = 0 To searchResult.Updates.Count-1
set update = searchResult.Updates.Item(I)
If update.IsDownloaded = true Then
WScript.Echo I + 1 & "> " & update.Title
updatesToInstall.Add(update)
If update.InstallationBehavior.RebootBehavior > 0 Then
rebootMayBeRequired = true
End If
End If
NextIf updatesToInstall.Count = 0 Then
WScript.Echo "No updates were successfully downloaded."
WScript.Quit
End IfIf rebootMayBeRequired = true Then
WScript.Echo vbCRLF & "These updates may require a reboot."
End IfWScript.Echo vbCRLF & "Would you like to install updates now? (Y/N)"
strInput = WScript.StdIn.Readline
WScript.EchoIf (strInput = "Y" or strInput = "y") Then
WScript.Echo "Installing updates..."
Set installer = updateSession.CreateUpdateInstaller()
installer.Updates = updatesToInstall
Set installationResult = installer.Install()
'Output results of install
WScript.Echo "Installation Result: " & _
installationResult.ResultCode
WScript.Echo "Reboot Required: " & _
installationResult.RebootRequired & vbCRLF
WScript.Echo "Listing of updates installed " & _
"and individual installation results:"
For I = 0 to updatesToInstall.Count - 1
WScript.Echo I + 1 & "> " & _
updatesToInstall.Item(i).Title & _
": " & installationResult.GetUpdateResult(i).ResultCode
Next
End IfBin für jede Unterstützung sehr dankbar.