2147483638 0x8000000A The data necessary to complete this operation not yet available. helpcontext & & & ) Return SetError ( $oErrors. helpfile & & _ "err.helpcontext is: " & & $oErrors. source & & _ "err.helpfile is: " & & $oErrors. scriptline & & _ "err.source is: " & & $oErrors. lastdllerror & & _ "err.scriptline is: " & & $oErrors. number, 8 ) & & _ "err.lastdllerror is: " & & $oErrors. windescription & & _ "err.number is: " & & Hex ( $oErrors. description & & _ "err.windescription:" & & $oErrors. Pause Else MsgBox ( 0, "", "cannot pause service" ) EndIf Case Else MsgBox ( 0, "", "unexpected state" ) EndSelect EndIf Next $server = "" EndFunc Func Error _Handle ( ) Msgbox ( 0, "Debug Information", "An error has occured!" & & & _ "err.description is: " & & $oErrors. ServerState = "SERVER_STARTED" Then $intNewStatus = "SERVER_PAUSED" $server. Stop Else MsgBox ( 0, "", "cannot stop service" ) EndIf Case $newStatus = "SERVER_PAUSED" If $server. ServerState = "SERVER_STARTED" Then $intNewStatus = "SERVER_STOPPED" $server. Continue Else MsgBox ( 0, "", "cannot start service" ) EndIf Case $newStatus = "SERVER_STOPPED" If $server. ServerState = "SERVER_PAUSED" Then $intNewStatus = "SERVER_CONTINUING" $server. ServerState = "SERVER_STOPPED" Then $intNewStatus = "SERVER_STARTED" $server. ServerState = "SERVER_CONTINUING" Then MsgBox ( 0, "", "server wasn't ready" ) Else Select Case $newStatus = "SERVER_STARTED" If $server. ServerState = "SERVER_PAUSING" Or $server. ServerState = "SERVER_STOPPING" Or $server. ServerState = "SERVER_STARTING" Or $server. ServerState = $newStatus Then MsgBox ( 0, "", "Status is already " & $newStatus ) ElseIf $server. Get ( "IIsFtpServer='" & $strSiteName & "'" ) If Then MsgBox ( 0, "", "site state problem" ) Exit EndIf If $server. FindSite ( "Ftp", $aArgs ) If IsArray ( $aSites ) Then _ArrayDisplay ( $aSites ) If UBound ( $aSites ) = - 1 Then $intResult = "ERR_GENERAL_FAILURE" EndIf EndIf For $i = 0 To UBound ( $aSites ) $bNonFatalError = False $strSiteName = $aSites Grab the site state before trying to start it $server = $providerObj. Get ( "IISFtpService='MSFTPSVC'" ) If Not IsObj ( $ServiceObj ) Then MsgBox ( 0, "", "permission error" ) Exit EndIf $aSites = $oScriptHelper. ProviderObj If Not IsObj ( $providerObj ) Then MsgBox ( 0, "", "provider error" ) Exit EndIf $intResult = 0 Quick check to see if we have permission $ServiceObj = $providerObj. WMIConnect If Not IsObj ( $oScriptHelper ) Then MsgBox ( 0, "", "wmiconnect error" ) Exit EndIf $providerObj = $oScriptHelper. Expand collapse popup #include Global $oScriptHelper $oErrors = ObjEvent ( "AutoIt.Error", "Error_Handle" ) $oScriptHelper = ObjCreate ( "Microsoft.IIsScriptHelper" ) If Not IsObj ( $oScriptHelper ) Then MsgBox ( 0, "", "IISscripthelper error" ) Exit EndIf $intResult = _ChangeFtpSiteStatus ( "Default FTP Site", "SERVER_STARTED" ) Func _ChangeFtpSiteStatus ( $aArgs, $newStatus ) Dim $server, $strSiteName Dim $intResult, $i, $intNewStatus Dim $aSites Dim $providerObj, $ServiceObj Dim $bNonFatalError $bNonFatalError = False $oScriptHelper.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |