‎11-04-2021 04:57 PM
{actionpath}list_startup_commands.vbs {computer}
' List Computer Startup Commands
strComputer = WScript.Arguments(0)
Set objShell = CreateObject("Wscript.Shell")
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colStartupCommands = objWMIService.ExecQuery _
("Select * from Win32_StartupCommand")
For Each objStartupCommand in colStartupCommands
strMsg = strMsg & "" & VbCrLf
strMsg = strMsg & "Command: " & objStartupCommand.Command & VbCrLf
strMsg = strMsg & "Description: " & objStartupCommand.Description & VbCrLf
strMsg = strMsg & "Location: " & objStartupCommand.Location & VbCrLf
strMsg = strMsg & "Name: " & objStartupCommand.Name & VbCrLf
strMsg = strMsg & "Setting ID: " & objStartupCommand.SettingID & VbCrLf
strMsg = strMsg & "User: " & objStartupCommand.User & VbCrLf
Next
objShell.Popup strMsg, AUTO_DISMISS, "Computer Startup Commands", OK_BUTTON
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now