1
reputation
2

Bax Mut

enter code here

'Get Some System Info 'This script will output the current start up items, processes 'and services to files in the log folder of the current repairs.

On Error Resume Next

Const adVarChar = 200 Const MaxCharacters = 255

Set objFSOStartupItems = CreateObject("Scripting.FileSystemObject")

outFileStartupItems = "%%%RepairLogFolder%%%_Info_Startup_Items.txt"

Set objFileStartupItems = objFSOStartupItems.CreateTextFile(outFileStartupItems,True)

Set DataListStartupItems = CreateObject("ADOR.Recordset")

DataListStartupItems.Fields.Append "Name", adVarChar, MaxCharacters DataListStartupItems.Fields.Append "Command", adVarChar, MaxCharacters DataListStartupItems.Fields.Append "Location", adVarChar, MaxCharacters DataListStartupItems.Fields.Append "SettingID", adVarChar, MaxCharacters DataListStartupItems.Fields.Append "User", adVarChar, MaxCharacters DataListStartupItems.Fields.Append "UserSID", adVarChar, MaxCharacters DataListStartupItems.Open

Set objWMIService = GetObject("winmgmts:\.\root\CIMV2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_StartupCommand", , 48)

For Each objItem In colItems DataListStartupItems.AddNew DataListStartupItems("Name") = objItem.Name DataListStartupItems("Command") = objItem.Command DataListStartupItems("Location") = objItem.Location DataListStartupItems("SettingID") = objItem.SettingID DataListStartupItems("User") = objItem.User DataListStartupItems("UserSID") = objItem.UserSID DataListStartupItems.Update Next

DataListStartupItems.Sort = "Name"
DataListStartupItems.MoveFirst
i = 0
objFileStartupItems.Write "Date: " & Date & vbCrLf
objFileStartupItems.Write "Time: " & Time & vbCrLf
objFileStartupItems.Write "Total: " & DataListStartupItems.RecordCount & vbCrLf
objFileStartupItems.Write "--------------------------------------------------------------------------------------------------------------------------------" & vbCrLf
0
answers
1
question
~39
people reached
  • Cherkasy, Черкасская область, Ukraine
  • Member for 1 year, 2 months
  • 0 profile views
  • Last seen Jul 25 '19 at 0:13

Top tags (1)

Score 0
Posts 1
Posts % 100

Top posts (1)

Badges (2)

Gold

Silver

Bronze

2

Rarest