cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
drobertson
Engaged Sweeper III
Add the custom asset action:


{actionpath}list_startup_commands.vbs {computer}


then the content of "list_startup_commands.vbs" is:


' 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
0 REPLIES 0