EDIT: Function modified for simplicity and examples given for proper handling.
I recently came across the need for this and wanted to share. Hope this helps someone. I only saw 2 questions like this on the forum, one of which was in the archvies.
The core functions are SaveTree() and LoadTree(). SaveTree() just converts the structure into text so that you can do with it as you please (I use FileAppend). LoadTree() takes a var you give it and loads the tree. You must populate the var yourself, for example with FileRead, getting the data from text file / previously saved tree.
SaveTree() dumps pure text in the following format:
Code: Select all
[child;]node name[;node child;node child;...];node_attrib
[child;]node name[;node child;node child;...];node_attrib
[child;]node name[;node child;node child;...];node_attrib
...
Explanation:
This example uses system services and puts them into a hierarchy. Exactly how I made the hierarchy I can't get into in this example, there's already a bunch of code, and then we're talking about WMI queries and other objects that would confuse the point, which is to save/load a TreeView's contents. I can put that stuff into another post if people want.[child;] = signifies that a particular node is a child of the previous line. If this node is top-level, then the substring "child;" does not exist.
node name = the node being recorded on any given line
[;node child;node child;...] = if the parent node has children, they are listed here, but only 1 level of children (ie. "siblings" as the AHK help docs put it)
node_attrib = "C" for checked / "E" for expanded / "B" for bold
Code: Select all
Global MainHwnd, ServiceTreeHwnd, ServiceTree, ServiceTreeSelectedID
Gui, New, +HwndMainHwnd
Gui, Add, Button, Section gSaveServiceTree, Save Layout
Gui, Add, Button, x+0 yp gLoadServiceTree, Load Layout
Gui, Add, TreeView, xs y+6 w600 r17 Checked +HwndServiceTreeHwnd vServiceTree ; define vControlName and Hwnd
Gui, Show
SaveServiceTree() {
MsgBox, 4, Save Tree, Are you sure?
IfMsgBox, No
return
FileDelete, ServiceTree.txt
; if you are dealing with multiple GUIs or multiple TreeViews, then the next 2 lines are VERY important for you
; Gui, %MainHwnd%:Default ; be sure to do this if necessary
; Gui, TreeView, ServiceTree ; be sure to do this if necessary
TreeData := SaveTree() ; dump tree data to var
FileAppend, %TreeData%, ServiceTree.txt ; save tree data
MsgBox Tree saved.
}
LoadServiceTree() { ; GUI button event
FileRead, TreeData, ServiceTree.txt ; read file into var (TreeData)
; if you are dealing with multiple GUIs or multiple TreeViews, then the next 2 lines are VERY important for you
; Gui, %MainHwnd%:Default ; be sure to do this if necessary
; Gui, TreeView, ServiceTree ; be sure to do this if necessary
TV_Delete() ; clear tree before reloading, if desired
GuiControl, -Redraw, ServiceTree ; turn off Redraw for performance gain
LoadTree(TreeData) ; Load tree
GuiControl, +Redraw, ServiceTree ; turn Redraw back on to see results
}
GuiContextMenu(GuiHwnd, CtrlHwnd, EventInfo, IsRightClick, X, Y) {
If (CtrlHwnd = ServiceTreeHwnd) {
Gui, TreeView, ServiceTree ; ensure that you operate on the intended TreeView (if you have multiple TreeView controls)
ServiceTreeSelectedID := EventInfo ; save unique tree item ID to global var for "Delete" menu
Menu, ServiceTreeMenu, Add, Delete, ServiceTreeMenuEvent ; right-click "Delete" context menu
Menu, ServiceTreeMenu, Show
}
}
ServiceTreeMenuEvent(ItemName, ItemPos, MenuName) {
If (ItemName = "Delete") {
Gui, %MainHwnd%:Default ; need this after the context menu appears
Gui, TreeView, ServiceTree ; might need this if you have multiple TreeView controls
result := TV_Delete(ServiceTreeSelectedID) ; delete tree item with it's unique ID saved from GuiContextMenu
}
}
GuiClose() { ; GUI close event
ExitApp ; do this otherwise the script keeps running after the GUI closes
}
; ====================================================================
; by TheArkive
; SaveTree()
; ====================================================================
SaveTree() {
CurID := TV_GetNext() ; get top most node ID
TV_GetText(CurText,CurID) ; get top most node text
While (CurID > 0) {
CurLine := CurText
attrib := TV_Get(CurID,"E") ; check if expanded
If (attrib > 0) {
attribList := "E"
}
attrib := TV_Get(CurID,"C") ; check if checked
If (attrib > 0) {
attribList .= "C"
}
attrib := TV_Get(CurID,"B") ; check if bold
If (attrib > 0) {
attribList .= "B"
}
CurChildID := TV_GetChild(CurID) ; get first child ID if any
TV_GetText(CurChildText,CurChildID) ; get first child text if any
While (CurChildID > 0) {
CurLine .= ";" CurChildText
CurChildID := TV_GetNext(CurChildID) ; init for next child
TV_GetText(CurChildText,CurChildID)
}
CurParentID := TV_GetParent(CurID) ; check if top level node or child
If (CurParentID > 0) {
CurLine := "child;" CurLine
}
FinalData .= CurLine ";" attribList "`r`n"
attribList := "" ; init/reset for next iteration
CurID := TV_GetNext(CurID,"Full") ; initialize for next iteration/node
TV_GetText(CurText,CurID)
}
return FinalData
}
; ====================================================================
; by TheArkive
; LoadTree(TreeData)
; ====================================================================
LoadTree(TreeData) {
IsChild := 0 ; first init
CurID := 0
ParentID := 0
IsExpanded := false
Loop, Parse, TreeData, `r, `n
{
CurLine := A_LoopField
iLen := StrLen(CurLine)
Loop, Parse, CurLine, % Chr(59) ; chr59 = ";"
i := A_Index ; get number of tokens in CurLine
lastSep := InStr(CurLine,";",,1,i-1)
firstSep := InStr(CurLine,";",,1,1)
CheckChild := SubStr(CurLine,1,(firstSep-1)) ; get first token of CurLine (sep = ";")
If (CheckChild = "child") {
IsChild := 1
}
attribList := SubStr(CurLine,lastSep+1,iLen-lastSep)
Loop, Parse, attribList
{
If (A_LoopField = "E") {
IsExpanded := true
} Else If (A_LoopField = "C") {
attribs .= "Check "
} Else If (A_LoopField = "B") {
attribs .= "Bold"
}
}
attribs := Trim(attribs,OmitChars:=" `r`n") ; get saved node attributes
If (IsChild = 0) {
nodeList := SubStr(CurLine,1,lastSep-1)
} Else {
nodeList := SubStr(CurLine,firstSep+1,(lastSep-firstSep-1))
}
nodeListFirst := InStr(nodeList,";",,1,1)
If (nodeListFirst = 0) {
FirstNode := nodeList
ChildNodes := ""
} Else {
FirstNode := SubStr(nodeList,1,nodeListFirst-1)
ChildNodes := SubStr(nodeList,(nodeListFirst+1),iLen-nodeListFirst)
}
; ====================================================
If (IsChild = 0) {
CurID := TV_Add(FirstNode,0,attribs) ; define CurID for future ParentID operations
If (ChildNodes <> "") {
Loop, Parse, ChildNodes, % Chr(59)
{
TV_Add(A_LoopField,CurID)
}
}
If (IsExpanded) {
TV_Modify(CurID,"Expand")
}
ParentID := TV_GetNext(CurID,"Full") ; define ParentID by navigating in "Full" mode, like how the datafile was made
} Else { ; if IsChild=true, FirstNode should already be created and ParentID should be the ID for that node
CheckParentID := TV_Modify(ParentID,attribs)
If (CheckParentID <> ParentID) {
MsgBox parent ID issue
}
If (ChildNodes <> "") {
Loop, Parse, ChildNodes, % Chr(59)
{
TV_Add(A_LoopField,ParentID)
}
}
If (IsExpanded) {
TV_Modify(ParentID,"Expand")
}
ParentID := TV_GetNext(ParentID,"Full") ; define ParentID by navigating in "Full" mode, like how the datafile was made
}
; ====================================================
attribs := "" ; subsequent inits
IsExpanded := false
attribList := ""
FirstNode := ""
ChildNodes := ""
IsChild := 0
nodeList := ""
}
}
Code: Select all
AllJoyn Router Service (AJRouter);
AOMEI Backupper Scheduler Service (Backupper Service);C
App Readiness (AppReadiness);
Application Layer Gateway Service (ALG);
Application Management (AppMgmt);
AssignedAccessManager Service (AssignedAccessManagerSvc);
Auto Time Zone Updater (tzautoupdate);
Autodesk Desktop App Service (AdAppMgrSvc);C
BitLocker Drive Encryption Service (BDESVC);
Block Level Backup Engine Service (wbengine);
Bluetooth Support Service (bthserv);C
Bluetooth User Support Service_8f667 (BluetoothUserService_8f667);
Capability Access Manager Service (camsvc);C
CaptureService_8f667 (CaptureService_8f667);
Clipboard User Service_8f667 (cbdhsvc_8f667);C
Connected Devices Platform User Service_8f667 (CDPUserSvc_8f667);C
ConsentUX_8f667 (ConsentUxUserSvc_8f667);
Contact Data_8f667 (PimIndexMaintenanceSvc_8f667);C
CredentialEnrollmentManagerUserSvc_8f667 (CredentialEnrollmentManagerUserSvc_8f667);
Data Sharing Service (DsSvc);
DbxSvc (DbxSvc);C
DCOM Server Process Launcher (DcomLaunch);Remote Procedure Call (RPC) (RpcSs);EC
child;Remote Procedure Call (RPC) (RpcSs);ActiveX Installer (AxInstSV);AVCTP service (BthAvctpSvc);Background Intelligent Transfer Service (BITS);Background Tasks Infrastructure Service (BrokerInfrastructure);Base Filtering Engine (BFE);Bluetooth Audio Gateway Service (BTAGService);Cellular Time (autotimesvc);Certificate Propagation (CertPropSvc);Client License Service (ClipSVC);CNG Key Isolation (KeyIso);COM+ Event System (EventSystem);Connected User Experiences and Telemetry (DiagTrack);CoreMessaging (CoreMessagingRegistrar);Credential Manager (VaultSvc);Cryptographic Services (CryptSvc);Data Usage (DusmSvc);Delivery Optimization (DoSvc);Device Management Enrollment Service (DmEnrollmentSvc);Device Management Wireless Application Protocol (WAP) Push message Routing Service (dmwappushservice);Device Setup Manager (DsmSvc);Diagnostic Execution Service (diagsvc);Display Policy Service (DispBrokerDesktopSvc);Distributed Link Tracking Client (TrkWks);Downloaded Maps Manager (MapsBroker);Dropbox Update Service (dbupdate);Dropbox Update Service (dbupdatem);Encrypting File System (EFS);Enterprise App Management Service (EntAppSvc);File History Service (fhsvc);Function Discovery Provider Host (fdPHost);Geolocation Service (lfsvc);Google Update Service (gupdate);Google Update Service (gupdatem);Group Policy Client (gpsvc);Intel(R) Content Protection HECI Service (cphs);Link-Layer Topology Discovery Mapper (lltdsvc);Local Session Manager (LSM);LxssManager (LxssManager);Microsoft Account Sign-in Assistant (wlidsvc);Microsoft Passport (NgcSvc);Microsoft Passport Container (NgcCtnrSvc);Microsoft Software Shadow Copy Provider (swprv);Microsoft Storage Spaces SMP (smphost);Microsoft Store Install Service (InstallService);Microsoft Windows SMS Router Service. (SmsRouter);Network Connection Broker (NcbService);Network Setup Service (NetSetupSvc);Network Store Interface Service (nsi);Offline Files (CscService);Optimize drives (defragsvc);Payments and NFC/SE Manager (SEMgrSvc);Performance Counter DLL Host (PerfHost);Performance Logs & Alerts (pla);Phone Service (PhoneSvc);Portable Device Enumerator Service (WPDBusEnum);Print Spooler (Spooler);Printer Extensions and Notifications (PrintNotify);Program Compatibility Assistant Service (PcaSvc);Quality Windows Audio Video Experience (QWAVE);Radio Management Service (RmSvc);Recommended Troubleshooting Service (TroubleshootingSvc);Remote Desktop Configuration (SessionEnv);Remote Desktop Services (TermService);Remote Registry (RemoteRegistry);Security Accounts Manager (SamSs);Security Center (wscsvc);Shared PC Account Manager (shpamsvc);Shell Hardware Detection (ShellHWDetection);Smart Card Removal Policy (SCPolicySvc);Software Protection (sppsvc);Spatial Data Service (SharedRealitySvc);State Repository Service (StateRepository);Still Image Acquisition Events (WiaRpc);SysMain (SysMain);System Events Broker (SystemEventsBroker);System Guard Runtime Monitor Broker (SgrmBroker);Telephony (TapiSrv);Touch Keyboard and Handwriting Panel Service (TabletInputService);Update Orchestrator Service (UsoSvc);User Profile Service (ProfSvc);Virtual Disk (vds);Volume Shadow Copy (VSS);Volumetric Audio Compositor Service (VacSvc);Web Management (WebManagement);Wi-Fi Direct Services Connection Manager Service (WFDSConMgrSvc);Windows Audio (Audiosrv);Windows Backup (SDRSVC);Windows Biometric Service (WbioSrvc);Windows Camera Frame Server (FrameServer);Windows Connect Now - Config Registrar (wcncsvc);Windows Defender Antivirus Service (WinDefend);Windows Encryption Provider Host Service (WEPHOSTSVC);Windows Image Acquisition (WIA) (stisvc);Windows Insider Service (wisvc);Windows Installer (msiserver);Windows License Manager Service (LicenseManager);Windows Management Instrumentation (Winmgmt);Windows Management Service (WManSvc);Windows Mobile Hotspot Service (icssvc);Windows Perception Service (spectrum);Windows Perception Simulation Service (perceptionsimulation);Windows Push Notifications System Service (WpnService);Windows PushToInstall Service (PushToInstall);Windows Remote Management (WS-Management) (WinRM);Windows Security Service (SecurityHealthService);Windows Update (wuauserv);Windows Update Medic Service (WaaSMedicSvc);WWAN AutoConfig (WwanSvc);Xbox Live Auth Manager (XblAuthManager);EC
child;ActiveX Installer (AxInstSV);
child;AVCTP service (BthAvctpSvc);C
child;Background Intelligent Transfer Service (BITS);
child;Background Tasks Infrastructure Service (BrokerInfrastructure);Embedded Mode (embeddedmode);Windows Search (WSearch);EC
child;Embedded Mode (embeddedmode);
child;Windows Search (WSearch);Windows Media Player Network Sharing Service (WMPNetworkSvc);Work Folders (workfolderssvc);EC
child;Windows Media Player Network Sharing Service (WMPNetworkSvc);
child;Work Folders (workfolderssvc);
child;Base Filtering Engine (BFE);ESET Firewall Helper (ekrnEpfw);IKE and AuthIP IPsec Keying Modules (IKEEXT);Internet Connection Sharing (ICS) (SharedAccess);IPsec Policy Agent (PolicyAgent);Network Connectivity Assistant (NcaSvc);Routing and Remote Access (RemoteAccess);Windows Defender Antivirus Network Inspection System Driver (WdNisDrv);Windows Defender Firewall (mpssvc);EC
child;ESET Firewall Helper (ekrnEpfw);C
child;IKE and AuthIP IPsec Keying Modules (IKEEXT);Xbox Live Networking Service (XboxNetApiSvc);EC
child;Xbox Live Networking Service (XboxNetApiSvc);
child;Internet Connection Sharing (ICS) (SharedAccess);
child;IPsec Policy Agent (PolicyAgent);C
child;Network Connectivity Assistant (NcaSvc);
child;Routing and Remote Access (RemoteAccess);
child;Windows Defender Antivirus Network Inspection System Driver (WdNisDrv);Windows Defender Antivirus Network Inspection Service (WdNisSvc);E
child;Windows Defender Antivirus Network Inspection Service (WdNisSvc);
child;Windows Defender Firewall (mpssvc);Xbox Live Networking Service (XboxNetApiSvc);EC
child;Xbox Live Networking Service (XboxNetApiSvc);
child;Bluetooth Audio Gateway Service (BTAGService);C
child;Cellular Time (autotimesvc);
child;Certificate Propagation (CertPropSvc);C
child;Client License Service (ClipSVC);
child;CNG Key Isolation (KeyIso);Extensible Authentication Protocol (Eaphost);Xbox Live Networking Service (XboxNetApiSvc);EC
child;Extensible Authentication Protocol (Eaphost);Wired AutoConfig (dot3svc);E
child;Wired AutoConfig (dot3svc);
child;Xbox Live Networking Service (XboxNetApiSvc);
child;COM+ Event System (EventSystem);System Event Notification Service (SENS);EC
child;System Event Notification Service (SENS);COM+ System Application (COMSysApp);Intel(R) HD Graphics Control Panel Service (igfxCUIService2.0.0.0);EC
child;COM+ System Application (COMSysApp);
child;Intel(R) HD Graphics Control Panel Service (igfxCUIService2.0.0.0);C
child;Connected User Experiences and Telemetry (DiagTrack);C
child;CoreMessaging (CoreMessagingRegistrar);C
child;Credential Manager (VaultSvc);C
child;Cryptographic Services (CryptSvc);Application Identity (AppIDSvc);EC
child;Application Identity (AppIDSvc);Smartlocker Filter Driver (applockerfltr);E
child;Smartlocker Filter Driver (applockerfltr);
child;Data Usage (DusmSvc);C
child;Delivery Optimization (DoSvc);C
child;Device Management Enrollment Service (DmEnrollmentSvc);
child;Device Management Wireless Application Protocol (WAP) Push message Routing Service (dmwappushservice);
child;Device Setup Manager (DsmSvc);
child;Diagnostic Execution Service (diagsvc);
child;Display Policy Service (DispBrokerDesktopSvc);C
child;Distributed Link Tracking Client (TrkWks);C
child;Downloaded Maps Manager (MapsBroker);
child;Dropbox Update Service (dbupdate);
child;Dropbox Update Service (dbupdatem);
child;Encrypting File System (EFS);
child;Enterprise App Management Service (EntAppSvc);
child;File History Service (fhsvc);
child;Function Discovery Provider Host (fdPHost);Function Discovery Resource Publication (FDResPub);E
child;Function Discovery Resource Publication (FDResPub);C
child;Geolocation Service (lfsvc);C
child;Google Update Service (gupdate);
child;Google Update Service (gupdatem);
child;Group Policy Client (gpsvc);
child;Intel(R) Content Protection HECI Service (cphs);
child;Link-Layer Topology Discovery Mapper (lltdsvc);
child;Local Session Manager (LSM);C
child;LxssManager (LxssManager);
child;Microsoft Account Sign-in Assistant (wlidsvc);
child;Microsoft Passport (NgcSvc);
child;Microsoft Passport Container (NgcCtnrSvc);
child;Microsoft Software Shadow Copy Provider (swprv);
child;Microsoft Storage Spaces SMP (smphost);
child;Microsoft Store Install Service (InstallService);C
child;Microsoft Windows SMS Router Service. (SmsRouter);
child;Network Connection Broker (NcbService);Connected Devices Platform Service (CDPSvc);EC
child;Connected Devices Platform Service (CDPSvc);C
child;Network Setup Service (NetSetupSvc);
child;Network Store Interface Service (nsi);DHCP Client (Dhcp);DNS Client (Dnscache);IKE and AuthIP IPsec Keying Modules (IKEEXT);IP Translation Configuration Service (IpxlatCfgSvc);Network Connections (Netman);SSDP Discovery (SSDPSRV);Windows Connection Manager (Wcmsvc);Workstation (LanmanWorkstation);EC
child;DHCP Client (Dhcp);Network Location Awareness (NlaSvc);WinHTTP Web Proxy Auto-Discovery Service (WinHttpAutoProxySvc);EC
child;Network Location Awareness (NlaSvc);Network List Service (netprofm);EC
child;Network List Service (netprofm);Microsoft App-V Client (AppVClient);Network Connected Devices Auto-Setup (NcdAutoSetup);EC
child;Microsoft App-V Client (AppVClient);
child;Network Connected Devices Auto-Setup (NcdAutoSetup);C
child;WinHTTP Web Proxy Auto-Discovery Service (WinHttpAutoProxySvc);IP Helper (iphlpsvc);EC
child;IP Helper (iphlpsvc);Network Connectivity Assistant (NcaSvc);EC
child;Network Connectivity Assistant (NcaSvc);
child;DNS Client (Dnscache);debugregsvc (debugregsvc);Network Connectivity Assistant (NcaSvc);Remote Access Connection Manager (RasMan);EC
child;debugregsvc (debugregsvc);
child;Network Connectivity Assistant (NcaSvc);
child;Remote Access Connection Manager (RasMan);Routing and Remote Access (RemoteAccess);EC
child;Routing and Remote Access (RemoteAccess);
child;IKE and AuthIP IPsec Keying Modules (IKEEXT);Xbox Live Networking Service (XboxNetApiSvc);EC
child;Xbox Live Networking Service (XboxNetApiSvc);
child;IP Translation Configuration Service (IpxlatCfgSvc);
child;Network Connections (Netman);
child;SSDP Discovery (SSDPSRV);UPnP Device Host (upnphost);EC
child;UPnP Device Host (upnphost);
child;Windows Connection Manager (Wcmsvc);Windows Mobile Hotspot Service (icssvc);WLAN AutoConfig (WlanSvc);EC
child;Windows Mobile Hotspot Service (icssvc);
child;WLAN AutoConfig (WlanSvc);C
child;Workstation (LanmanWorkstation);Netlogon (Netlogon);Remote Desktop Configuration (SessionEnv);EC
child;Netlogon (Netlogon);
child;Remote Desktop Configuration (SessionEnv);
child;Offline Files (CscService);
child;Optimize drives (defragsvc);
child;Payments and NFC/SE Manager (SEMgrSvc);
child;Performance Counter DLL Host (PerfHost);
child;Performance Logs & Alerts (pla);
child;Phone Service (PhoneSvc);C
child;Portable Device Enumerator Service (WPDBusEnum);
child;Print Spooler (Spooler);Fax (Fax);EC
child;Fax (Fax);
child;Printer Extensions and Notifications (PrintNotify);
child;Program Compatibility Assistant Service (PcaSvc);C
child;Quality Windows Audio Video Experience (QWAVE);
child;Radio Management Service (RmSvc);
child;Recommended Troubleshooting Service (TroubleshootingSvc);
child;Remote Desktop Configuration (SessionEnv);
child;Remote Desktop Services (TermService);Remote Desktop Services UserMode Port Redirector (UmRdpService);E
child;Remote Desktop Services UserMode Port Redirector (UmRdpService);
child;Remote Registry (RemoteRegistry);
child;Security Accounts Manager (SamSs);Distributed Transaction Coordinator (MSDTC);KtmRm for Distributed Transaction Coordinator (KtmRm);Server (LanmanServer);EC
child;Distributed Transaction Coordinator (MSDTC);
child;KtmRm for Distributed Transaction Coordinator (KtmRm);
child;Server (LanmanServer);C
child;Security Center (wscsvc);C
child;Shared PC Account Manager (shpamsvc);
child;Shell Hardware Detection (ShellHWDetection);C
child;Smart Card Removal Policy (SCPolicySvc);C
child;Software Protection (sppsvc);
child;Spatial Data Service (SharedRealitySvc);
child;State Repository Service (StateRepository);AppX Deployment Service (AppXSVC);EC
child;AppX Deployment Service (AppXSVC);
child;Still Image Acquisition Events (WiaRpc);
child;SysMain (SysMain);C
child;System Events Broker (SystemEventsBroker);Task Scheduler (Schedule);EC
child;Task Scheduler (Schedule);Natural Authentication (NaturalAuthentication);EC
child;Natural Authentication (NaturalAuthentication);
child;System Guard Runtime Monitor Broker (SgrmBroker);C
child;Telephony (TapiSrv);Fax (Fax);E
child;Fax (Fax);
child;Touch Keyboard and Handwriting Panel Service (TabletInputService);C
child;Update Orchestrator Service (UsoSvc);C
child;User Profile Service (ProfSvc);Application Information (Appinfo);Natural Authentication (NaturalAuthentication);Shared PC Account Manager (shpamsvc);User Manager (UserManager);EC
child;Application Information (Appinfo);B
child;Natural Authentication (NaturalAuthentication);
child;Shared PC Account Manager (shpamsvc);
child;User Manager (UserManager);Web Account Manager (TokenBroker);Xbox Live Game Save (XblGameSave);EC
child;Web Account Manager (TokenBroker);C
child;Xbox Live Game Save (XblGameSave);
child;Virtual Disk (vds);
child;Volume Shadow Copy (VSS);
child;Volumetric Audio Compositor Service (VacSvc);
child;Web Management (WebManagement);
child;Wi-Fi Direct Services Connection Manager Service (WFDSConMgrSvc);
child;Windows Audio (Audiosrv);C
child;Windows Backup (SDRSVC);
child;Windows Biometric Service (WbioSrvc);C
child;Windows Camera Frame Server (FrameServer);
child;Windows Connect Now - Config Registrar (wcncsvc);C
child;Windows Defender Antivirus Service (WinDefend);
child;Windows Encryption Provider Host Service (WEPHOSTSVC);
child;Windows Image Acquisition (WIA) (stisvc);C
child;Windows Insider Service (wisvc);
child;Windows Installer (msiserver);
child;Windows License Manager Service (LicenseManager);C
child;Windows Management Instrumentation (Winmgmt);IP Helper (iphlpsvc);EC
child;IP Helper (iphlpsvc);Network Connectivity Assistant (NcaSvc);EC
child;Network Connectivity Assistant (NcaSvc);
child;Windows Management Service (WManSvc);
child;Windows Mobile Hotspot Service (icssvc);
child;Windows Perception Service (spectrum);
child;Windows Perception Simulation Service (perceptionsimulation);
child;Windows Push Notifications System Service (WpnService);C
child;Windows PushToInstall Service (PushToInstall);
child;Windows Remote Management (WS-Management) (WinRM);
child;Windows Security Service (SecurityHealthService);C
child;Windows Update (wuauserv);
child;Windows Update Medic Service (WaaSMedicSvc);
child;WWAN AutoConfig (WwanSvc);Local Profile Assistant Service (wlpasvc);E
child;Local Profile Assistant Service (wlpasvc);
child;Xbox Live Auth Manager (XblAuthManager);Xbox Live Game Save (XblGameSave);E
child;Xbox Live Game Save (XblGameSave);
Developer Tools Service (DeveloperToolsService);
Device Association Service (DeviceAssociationService);C
Device Install Service (DeviceInstall);
DeviceAssociationBroker_8f667 (DeviceAssociationBrokerSvc_8f667);
DevicePicker_8f667 (DevicePickerUserSvc_8f667);
DevicesFlow_8f667 (DevicesFlowUserSvc_8f667);
DevQuery Background Discovery Broker (DevQueryBroker);
Diagnostic Policy Service (DPS);C
Diagnostic Service Host (WdiServiceHost);C
Diagnostic System Host (WdiSystemHost);
Display Enhancement Service (DisplayEnhancementService);C
Elan Service (ETDService);C
ESET Service (ekrn);C
FlexNet Licensing Service 64 (FlexNet Licensing Service 64);
GameDVR and Broadcast User Service_8f667 (BcastDVRUserService_8f667);
GraphicsPerfSvc (GraphicsPerfSvc);
Human Interface Device Service (hidserv);C
Hyper-V Data Exchange Service (vmickvpexchange);
Hyper-V Guest Service Interface (vmicguestinterface);
Hyper-V Guest Shutdown Service (vmicshutdown);
Hyper-V Heartbeat Service (vmicheartbeat);
Hyper-V PowerShell Direct Service (vmicvmsession);
Hyper-V Remote Desktop Virtualization Service (vmicrdv);
Hyper-V Volume Shadow Copy Requestor (vmicvss);
IncrediBuild Agent (IncrediBuild_Agent);C
IncrediBuild Coordinator (IncrediBuild_Coordinator);C
InstallRoot (InstallRoot);C
Intel Bluetooth Service (ibtsiva);C
Language Experience Service (LxpSvc);
Logitech Gaming Registry Service (LogiRegistryService);C
LxssManagerUser_8f667 (LxssManagerUser_8f667);C
MessagingService_8f667 (MessagingService_8f667);
Microsoft (R) Diagnostics Hub Standard Collector Service (diagnosticshub.standardcollector.service);
Microsoft iSCSI Initiator Service (MSiSCSI);
Mozilla Maintenance Service (MozillaMaintenance);
Net.Tcp Port Sharing Service (NetTcpPortSharing);
NVIDIA Display Container LS (NVDisplay.ContainerLocalSystem);C
NVIDIA Telemetry Container (NvTelemetryContainer);C
Office Source Engine (ose);
OpenSSH Authentication Agent (ssh-agent);
OpenSSH SSH Server (sshd);SshdBroker (SshdBroker);E
child;SshdBroker (SshdBroker);
Parental Controls (WpcMonSvc);
Peer Networking Identity Manager (p2pimsvc);Peer Name Resolution Protocol (PNRPsvc);Peer Networking Grouping (p2psvc);E
child;Peer Name Resolution Protocol (PNRPsvc);Peer Networking Grouping (p2psvc);PNRP Machine Name Publication Service (PNRPAutoReg);E
child;Peer Networking Grouping (p2psvc);
child;PNRP Machine Name Publication Service (PNRPAutoReg);
child;Peer Networking Grouping (p2psvc);
Plug and Play (PlugPlay);Logitech Bluetooth Service (LBTServ);EC
child;Logitech Bluetooth Service (LBTServ);
Power (Power);C
PrintWorkflow_8f667 (PrintWorkflowUserSvc_8f667);
Private Internet Access Service (PrivateInternetAccessService);C
Problem Reports and Solutions Control Panel Support (wercplsupport);
Remote Packet Capture Protocol v.0 (experimental) (rpcapd);
Remote Procedure Call (RPC) Locator (RpcLocator);
Retail Demo Service (RetailDemo);
RPC Endpoint Mapper (RpcEptMapper);Remote Procedure Call (RPC) (RpcSs);EC
child;Remote Procedure Call (RPC) (RpcSs);ActiveX Installer (AxInstSV);AVCTP service (BthAvctpSvc);Background Intelligent Transfer Service (BITS);Background Tasks Infrastructure Service (BrokerInfrastructure);Base Filtering Engine (BFE);Bluetooth Audio Gateway Service (BTAGService);Cellular Time (autotimesvc);Certificate Propagation (CertPropSvc);Client License Service (ClipSVC);CNG Key Isolation (KeyIso);COM+ Event System (EventSystem);Connected User Experiences and Telemetry (DiagTrack);CoreMessaging (CoreMessagingRegistrar);Credential Manager (VaultSvc);Cryptographic Services (CryptSvc);Data Usage (DusmSvc);Delivery Optimization (DoSvc);Device Management Enrollment Service (DmEnrollmentSvc);Device Management Wireless Application Protocol (WAP) Push message Routing Service (dmwappushservice);Device Setup Manager (DsmSvc);Diagnostic Execution Service (diagsvc);Display Policy Service (DispBrokerDesktopSvc);Distributed Link Tracking Client (TrkWks);Downloaded Maps Manager (MapsBroker);Dropbox Update Service (dbupdate);Dropbox Update Service (dbupdatem);Encrypting File System (EFS);Enterprise App Management Service (EntAppSvc);File History Service (fhsvc);Function Discovery Provider Host (fdPHost);Geolocation Service (lfsvc);Google Update Service (gupdate);Google Update Service (gupdatem);Group Policy Client (gpsvc);Intel(R) Content Protection HECI Service (cphs);Link-Layer Topology Discovery Mapper (lltdsvc);Local Session Manager (LSM);LxssManager (LxssManager);Microsoft Account Sign-in Assistant (wlidsvc);Microsoft Passport (NgcSvc);Microsoft Passport Container (NgcCtnrSvc);Microsoft Software Shadow Copy Provider (swprv);Microsoft Storage Spaces SMP (smphost);Microsoft Store Install Service (InstallService);Microsoft Windows SMS Router Service. (SmsRouter);Natural Authentication (NaturalAuthentication);Network Connection Broker (NcbService);Network Setup Service (NetSetupSvc);Network Store Interface Service (nsi);Offline Files (CscService);Optimize drives (defragsvc);Payments and NFC/SE Manager (SEMgrSvc);Performance Counter DLL Host (PerfHost);Performance Logs & Alerts (pla);Phone Service (PhoneSvc);Portable Device Enumerator Service (WPDBusEnum);Print Spooler (Spooler);Printer Extensions and Notifications (PrintNotify);Program Compatibility Assistant Service (PcaSvc);Quality Windows Audio Video Experience (QWAVE);Radio Management Service (RmSvc);Recommended Troubleshooting Service (TroubleshootingSvc);Remote Desktop Configuration (SessionEnv);Remote Desktop Services (TermService);Remote Registry (RemoteRegistry);Security Accounts Manager (SamSs);Security Center (wscsvc);Shared PC Account Manager (shpamsvc);Shell Hardware Detection (ShellHWDetection);Smart Card Removal Policy (SCPolicySvc);Software Protection (sppsvc);Spatial Data Service (SharedRealitySvc);State Repository Service (StateRepository);Still Image Acquisition Events (WiaRpc);SysMain (SysMain);System Events Broker (SystemEventsBroker);System Guard Runtime Monitor Broker (SgrmBroker);Telephony (TapiSrv);Touch Keyboard and Handwriting Panel Service (TabletInputService);Update Orchestrator Service (UsoSvc);User Profile Service (ProfSvc);Virtual Disk (vds);Volume Shadow Copy (VSS);Volumetric Audio Compositor Service (VacSvc);Web Management (WebManagement);Wi-Fi Direct Services Connection Manager Service (WFDSConMgrSvc);Windows Audio (Audiosrv);Windows Backup (SDRSVC);Windows Biometric Service (WbioSrvc);Windows Camera Frame Server (FrameServer);Windows Connect Now - Config Registrar (wcncsvc);Windows Defender Antivirus Service (WinDefend);Windows Encryption Provider Host Service (WEPHOSTSVC);Windows Image Acquisition (WIA) (stisvc);Windows Insider Service (wisvc);Windows Installer (msiserver);Windows License Manager Service (LicenseManager);Windows Management Instrumentation (Winmgmt);Windows Management Service (WManSvc);Windows Mobile Hotspot Service (icssvc);Windows Perception Service (spectrum);Windows Perception Simulation Service (perceptionsimulation);Windows Push Notifications System Service (WpnService);Windows PushToInstall Service (PushToInstall);Windows Remote Management (WS-Management) (WinRM);Windows Security Service (SecurityHealthService);Windows Update (wuauserv);Windows Update Medic Service (WaaSMedicSvc);WWAN AutoConfig (WwanSvc);Xbox Live Auth Manager (XblAuthManager);EC
child;ActiveX Installer (AxInstSV);
child;AVCTP service (BthAvctpSvc);C
child;Background Intelligent Transfer Service (BITS);
child;Background Tasks Infrastructure Service (BrokerInfrastructure);Embedded Mode (embeddedmode);Windows Search (WSearch);EC
child;Embedded Mode (embeddedmode);
child;Windows Search (WSearch);Windows Media Player Network Sharing Service (WMPNetworkSvc);Work Folders (workfolderssvc);EC
child;Windows Media Player Network Sharing Service (WMPNetworkSvc);
child;Work Folders (workfolderssvc);
child;Base Filtering Engine (BFE);ESET Firewall Helper (ekrnEpfw);IKE and AuthIP IPsec Keying Modules (IKEEXT);Internet Connection Sharing (ICS) (SharedAccess);IPsec Policy Agent (PolicyAgent);Network Connectivity Assistant (NcaSvc);Routing and Remote Access (RemoteAccess);Windows Defender Antivirus Network Inspection System Driver (WdNisDrv);Windows Defender Firewall (mpssvc);EC
child;ESET Firewall Helper (ekrnEpfw);C
child;IKE and AuthIP IPsec Keying Modules (IKEEXT);Xbox Live Networking Service (XboxNetApiSvc);EC
child;Xbox Live Networking Service (XboxNetApiSvc);
child;Internet Connection Sharing (ICS) (SharedAccess);
child;IPsec Policy Agent (PolicyAgent);C
child;Network Connectivity Assistant (NcaSvc);
child;Routing and Remote Access (RemoteAccess);
child;Windows Defender Antivirus Network Inspection System Driver (WdNisDrv);Windows Defender Antivirus Network Inspection Service (WdNisSvc);E
child;Windows Defender Antivirus Network Inspection Service (WdNisSvc);
child;Windows Defender Firewall (mpssvc);Xbox Live Networking Service (XboxNetApiSvc);EC
child;Xbox Live Networking Service (XboxNetApiSvc);
child;Bluetooth Audio Gateway Service (BTAGService);C
child;Cellular Time (autotimesvc);
child;Certificate Propagation (CertPropSvc);C
child;Client License Service (ClipSVC);
child;CNG Key Isolation (KeyIso);Extensible Authentication Protocol (Eaphost);Xbox Live Networking Service (XboxNetApiSvc);EC
child;Extensible Authentication Protocol (Eaphost);Wired AutoConfig (dot3svc);E
child;Wired AutoConfig (dot3svc);
child;Xbox Live Networking Service (XboxNetApiSvc);
child;COM+ Event System (EventSystem);System Event Notification Service (SENS);EC
child;System Event Notification Service (SENS);COM+ System Application (COMSysApp);Intel(R) HD Graphics Control Panel Service (igfxCUIService2.0.0.0);EC
child;COM+ System Application (COMSysApp);
child;Intel(R) HD Graphics Control Panel Service (igfxCUIService2.0.0.0);C
child;Connected User Experiences and Telemetry (DiagTrack);C
child;CoreMessaging (CoreMessagingRegistrar);C
child;Credential Manager (VaultSvc);C
child;Cryptographic Services (CryptSvc);Application Identity (AppIDSvc);EC
child;Application Identity (AppIDSvc);Smartlocker Filter Driver (applockerfltr);E
child;Smartlocker Filter Driver (applockerfltr);
child;Data Usage (DusmSvc);C
child;Delivery Optimization (DoSvc);C
child;Device Management Enrollment Service (DmEnrollmentSvc);
child;Device Management Wireless Application Protocol (WAP) Push message Routing Service (dmwappushservice);
child;Device Setup Manager (DsmSvc);
child;Diagnostic Execution Service (diagsvc);
child;Display Policy Service (DispBrokerDesktopSvc);C
child;Distributed Link Tracking Client (TrkWks);C
child;Downloaded Maps Manager (MapsBroker);
child;Dropbox Update Service (dbupdate);
child;Dropbox Update Service (dbupdatem);
child;Encrypting File System (EFS);
child;Enterprise App Management Service (EntAppSvc);
child;File History Service (fhsvc);
child;Function Discovery Provider Host (fdPHost);Function Discovery Resource Publication (FDResPub);E
child;Function Discovery Resource Publication (FDResPub);C
child;Geolocation Service (lfsvc);C
child;Google Update Service (gupdate);
child;Google Update Service (gupdatem);
child;Group Policy Client (gpsvc);
child;Intel(R) Content Protection HECI Service (cphs);
child;Link-Layer Topology Discovery Mapper (lltdsvc);
child;Local Session Manager (LSM);C
child;LxssManager (LxssManager);
child;Microsoft Account Sign-in Assistant (wlidsvc);
child;Microsoft Passport (NgcSvc);
child;Microsoft Passport Container (NgcCtnrSvc);
child;Microsoft Software Shadow Copy Provider (swprv);
child;Microsoft Storage Spaces SMP (smphost);
child;Microsoft Store Install Service (InstallService);C
child;Microsoft Windows SMS Router Service. (SmsRouter);
child;Natural Authentication (NaturalAuthentication);
child;Network Connection Broker (NcbService);Connected Devices Platform Service (CDPSvc);EC
child;Connected Devices Platform Service (CDPSvc);C
child;Network Setup Service (NetSetupSvc);
child;Network Store Interface Service (nsi);DHCP Client (Dhcp);DNS Client (Dnscache);IKE and AuthIP IPsec Keying Modules (IKEEXT);IP Translation Configuration Service (IpxlatCfgSvc);Network Connections (Netman);SSDP Discovery (SSDPSRV);Windows Connection Manager (Wcmsvc);Workstation (LanmanWorkstation);EC
child;DHCP Client (Dhcp);Network Location Awareness (NlaSvc);WinHTTP Web Proxy Auto-Discovery Service (WinHttpAutoProxySvc);EC
child;Network Location Awareness (NlaSvc);Network List Service (netprofm);EC
child;Network List Service (netprofm);Microsoft App-V Client (AppVClient);Network Connected Devices Auto-Setup (NcdAutoSetup);EC
child;Microsoft App-V Client (AppVClient);
child;Network Connected Devices Auto-Setup (NcdAutoSetup);C
child;WinHTTP Web Proxy Auto-Discovery Service (WinHttpAutoProxySvc);IP Helper (iphlpsvc);EC
child;IP Helper (iphlpsvc);Network Connectivity Assistant (NcaSvc);EC
child;Network Connectivity Assistant (NcaSvc);
child;DNS Client (Dnscache);debugregsvc (debugregsvc);Network Connectivity Assistant (NcaSvc);Remote Access Connection Manager (RasMan);EC
child;debugregsvc (debugregsvc);
child;Network Connectivity Assistant (NcaSvc);
child;Remote Access Connection Manager (RasMan);Routing and Remote Access (RemoteAccess);EC
child;Routing and Remote Access (RemoteAccess);
child;IKE and AuthIP IPsec Keying Modules (IKEEXT);Xbox Live Networking Service (XboxNetApiSvc);EC
child;Xbox Live Networking Service (XboxNetApiSvc);
child;IP Translation Configuration Service (IpxlatCfgSvc);
child;Network Connections (Netman);
child;SSDP Discovery (SSDPSRV);UPnP Device Host (upnphost);EC
child;UPnP Device Host (upnphost);
child;Windows Connection Manager (Wcmsvc);Windows Mobile Hotspot Service (icssvc);WLAN AutoConfig (WlanSvc);EC
child;Windows Mobile Hotspot Service (icssvc);
child;WLAN AutoConfig (WlanSvc);C
child;Workstation (LanmanWorkstation);Netlogon (Netlogon);Remote Desktop Configuration (SessionEnv);EC
child;Netlogon (Netlogon);
child;Remote Desktop Configuration (SessionEnv);
child;Offline Files (CscService);
child;Optimize drives (defragsvc);
child;Payments and NFC/SE Manager (SEMgrSvc);
child;Performance Counter DLL Host (PerfHost);
child;Performance Logs & Alerts (pla);
child;Phone Service (PhoneSvc);C
child;Portable Device Enumerator Service (WPDBusEnum);
child;Print Spooler (Spooler);Fax (Fax);EC
child;Fax (Fax);
child;Printer Extensions and Notifications (PrintNotify);
child;Program Compatibility Assistant Service (PcaSvc);C
child;Quality Windows Audio Video Experience (QWAVE);
child;Radio Management Service (RmSvc);
child;Recommended Troubleshooting Service (TroubleshootingSvc);
child;Remote Desktop Configuration (SessionEnv);
child;Remote Desktop Services (TermService);Remote Desktop Services UserMode Port Redirector (UmRdpService);E
child;Remote Desktop Services UserMode Port Redirector (UmRdpService);
child;Remote Registry (RemoteRegistry);
child;Security Accounts Manager (SamSs);Distributed Transaction Coordinator (MSDTC);KtmRm for Distributed Transaction Coordinator (KtmRm);Server (LanmanServer);EC
child;Distributed Transaction Coordinator (MSDTC);
child;KtmRm for Distributed Transaction Coordinator (KtmRm);
child;Server (LanmanServer);C
child;Security Center (wscsvc);C
child;Shared PC Account Manager (shpamsvc);
child;Shell Hardware Detection (ShellHWDetection);C
child;Smart Card Removal Policy (SCPolicySvc);C
child;Software Protection (sppsvc);
child;Spatial Data Service (SharedRealitySvc);
child;State Repository Service (StateRepository);AppX Deployment Service (AppXSVC);EC
child;AppX Deployment Service (AppXSVC);
child;Still Image Acquisition Events (WiaRpc);
child;SysMain (SysMain);C
child;System Events Broker (SystemEventsBroker);Task Scheduler (Schedule);EC
child;Task Scheduler (Schedule);Natural Authentication (NaturalAuthentication);EC
child;Natural Authentication (NaturalAuthentication);
child;System Guard Runtime Monitor Broker (SgrmBroker);C
child;Telephony (TapiSrv);Fax (Fax);E
child;Fax (Fax);
child;Touch Keyboard and Handwriting Panel Service (TabletInputService);C
child;Update Orchestrator Service (UsoSvc);C
child;User Profile Service (ProfSvc);Application Information (Appinfo);Natural Authentication (NaturalAuthentication);Shared PC Account Manager (shpamsvc);User Manager (UserManager);EC
child;Application Information (Appinfo);B
child;Natural Authentication (NaturalAuthentication);
child;Shared PC Account Manager (shpamsvc);
child;User Manager (UserManager);Web Account Manager (TokenBroker);Xbox Live Game Save (XblGameSave);EC
child;Web Account Manager (TokenBroker);C
child;Xbox Live Game Save (XblGameSave);
child;Virtual Disk (vds);
child;Volume Shadow Copy (VSS);
child;Volumetric Audio Compositor Service (VacSvc);
child;Web Management (WebManagement);
child;Wi-Fi Direct Services Connection Manager Service (WFDSConMgrSvc);
child;Windows Audio (Audiosrv);C
child;Windows Backup (SDRSVC);
child;Windows Biometric Service (WbioSrvc);C
child;Windows Camera Frame Server (FrameServer);
child;Windows Connect Now - Config Registrar (wcncsvc);C
child;Windows Defender Antivirus Service (WinDefend);
child;Windows Encryption Provider Host Service (WEPHOSTSVC);
child;Windows Image Acquisition (WIA) (stisvc);C
child;Windows Insider Service (wisvc);
child;Windows Installer (msiserver);
child;Windows License Manager Service (LicenseManager);C
child;Windows Management Instrumentation (Winmgmt);IP Helper (iphlpsvc);EC
child;IP Helper (iphlpsvc);Network Connectivity Assistant (NcaSvc);EC
child;Network Connectivity Assistant (NcaSvc);
child;Windows Management Service (WManSvc);
child;Windows Mobile Hotspot Service (icssvc);
child;Windows Perception Service (spectrum);
child;Windows Perception Simulation Service (perceptionsimulation);
child;Windows Push Notifications System Service (WpnService);C
child;Windows PushToInstall Service (PushToInstall);
child;Windows Remote Management (WS-Management) (WinRM);
child;Windows Security Service (SecurityHealthService);C
child;Windows Update (wuauserv);
child;Windows Update Medic Service (WaaSMedicSvc);
child;WWAN AutoConfig (WwanSvc);Local Profile Assistant Service (wlpasvc);E
child;Local Profile Assistant Service (wlpasvc);
child;Xbox Live Auth Manager (XblAuthManager);Xbox Live Game Save (XblGameSave);E
child;Xbox Live Game Save (XblGameSave);
Secondary Logon (seclogon);
Secure Socket Tunneling Protocol Service (SstpSvc);Remote Access Connection Manager (RasMan);EC
child;Remote Access Connection Manager (RasMan);Routing and Remote Access (RemoteAccess);EC
child;Routing and Remote Access (RemoteAccess);
Sensor Data Service (SensorDataService);
Sensor Monitoring Service (SensrSvc);
Sensor Service (SensorService);
Smart Card (SCardSvr);
Smart Card Device Enumeration Service (ScDeviceEnum);
SNMP Trap (SNMPTRAP);
Spot Verifier (svsvc);
Steam Client Service (Steam Client Service);
Storage Service (StorSvc);C
Storage Tiers Management (TieringEngineService);
Sync Host_8f667 (OneSyncSvc_8f667);C
Themes (Themes);C
Time Broker (TimeBrokerSvc);C
User Data Access_8f667 (UserDataSvc_8f667);C
User Data Storage_8f667 (UnistoreSvc_8f667);C
User Experience Virtualization Service (UevAgentService);
Visual Studio Standard Collector Service 150 (VSStandardCollectorService150);
WalletService (WalletService);
WarpJITSvc (WarpJITSvc);
Windows Audio Endpoint Builder (AudioEndpointBuilder);Windows Audio (Audiosrv);EC
child;Windows Audio (Audiosrv);C
Windows Defender Advanced Threat Protection Service (Sense);
Windows Error Reporting Service (WerSvc);
Windows Event Log (EventLog);Network Location Awareness (NlaSvc);Windows Event Collector (Wecsvc);EC
child;Network Location Awareness (NlaSvc);C
child;Windows Event Collector (Wecsvc);
Windows Font Cache Service (FontCache);C
Windows Modules Installer (TrustedInstaller);
Windows Phone IP over USB Transport (IpOverUsbSvc);C
Windows Presentation Foundation Font Cache 3.0.0.0 (FontCache3.0.0.0);C
Windows Push Notifications User Service_8f667 (WpnUserService_8f667);C
Windows Time (W32Time);
WMI Performance Adapter (wmiApSrv);
Xbox Accessory Management Service (XboxGipSvc);
In the above example code you can use the context menu to delete entries and then use the buttons to save/load the result.
I hope someone can find this useful
EDIT: If you have specific questions or example requests, post a reply and I'll do my best to elaborate.