Why when I have this line :
Set WshShell = WScript.CreateObject("WScript.Shell")
in my script the Repair Task allways come back with ERROR 412
If this line is comment out It execute the script
The Script:
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set WshShell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
'********* MAIN ****
On Error Resume Next
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set Flog = fso.OpenTextFile("c:\temp\JavaAutoUpdate.txt", ForAppending, True)
Flog.WriteLine("To Turn Off Java Auto UPdate")
WshShell.Regdelete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\SunJavaUpdateSched"
Flog.WriteLine("After Regdelete")
ReportRepairResult true, "Repair Sucessfull"
Vulscan Log:
Last status: Done. 1 patches were found
No patch download required for *CD-Java Maurice Test_Remove Java Auto Updater
Checking for other instances of scanner or software distribution agent
Last status: Waiting
Last status: Done
got mutex
Running patch *CD-Java Maurice Test_Remove Java Auto Updater
ShouldScan *CD-Java Maurice Test_Remove Java Auto Updater before repairing returned: 0
Command Interpreter running
ERROR. Microsoft VBScript runtime error: Object required: 'WScript' (line: 9, char: 0, text: )
Message returned from repair script was Unexpected error in custom script source. See agent log for details
ERROR(RunVbScript) Failed to run command - 80004005
DownloadPatch ERROR: Failed to run commands (80004005).
Last status: Failed