From 5648b0f9973a341acda4554a0fe7cdcb76b4d05b Mon Sep 17 00:00:00 2001
From: Kelly Kelly <kelly@basistech.com>
Date: Wed, 2 Mar 2022 12:15:40 -0500
Subject: [PATCH] Fixed a few issues

---
 .../recentactivity/ExtractRegistry.java       | 30 ++-----------------
 1 file changed, 3 insertions(+), 27 deletions(-)

diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java
index 5448a3a7e5..6f40e20af9 100644
--- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java
+++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java
@@ -658,30 +658,6 @@ private boolean parseAutopsyPluginOutput(String regFilePath, AbstractFile regFil
                         osInfo.setProductId(productId);
                         osInfo.setRegOwner(regOwner);
                         osInfo.setRegOrg(regOrg);
-//                        try {
-//                            Collection<BlackboardAttribute> bbattributes = new ArrayList<>();
-//                            bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME, parentModuleName, version));
-//                            if (installtime != null) {
-//                                bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME, parentModuleName, installtime));
-//                            }
-//                            bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH, parentModuleName, systemRoot));
-//                            bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PRODUCT_ID, parentModuleName, productId));
-//                            bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_OWNER, parentModuleName, regOwner));
-//                            bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_ORGANIZATION, parentModuleName, regOrg));
-//
-//                            // Check if there is already an OS_INFO artifact for this file, and add to that if possible.
-//                            ArrayList<BlackboardArtifact> results = tskCase.getBlackboardArtifacts(ARTIFACT_TYPE.TSK_OS_INFO, regFile.getId());
-//                            if (results.isEmpty()) {
-//                                newArtifacts.add(createArtifactWithAttributes(BlackboardArtifact.Type.TSK_OS_INFO, regFile, bbattributes));
-//                            } else {
-//                                results.get(0).addAttributes(bbattributes);
-//                            }
-
-                            
-
-//                        } catch (TskCoreException ex) {
-//                            logger.log(Level.SEVERE, String.format("Error adding installed program artifact to blackboard for file %d.", regFile.getId()), ex); //NON-NLS
-//                        }
                         break;
                     case "Profiler": // NON-NLS
                         String os = "";
@@ -735,7 +711,7 @@ private boolean parseAutopsyPluginOutput(String regFilePath, AbstractFile regFil
                             }
                         }
                         
-                        osInfo.setOsName(compName);
+                        osInfo.setCompName(compName);
                         osInfo.setDomain(domainName);
                         
                         for (Map.Entry<String, String> userMap : getUserNameMap().entrySet()) {
@@ -2351,7 +2327,7 @@ private boolean isDomainIdInSAMList(String osAccountSID) {
     // of TSK_OS_INFO is created per RA run.
     private class OSInfo {
         private String compName = null;
-        private String progName = "Window";
+        private String progName = "Windows";
         private String processorArchitecture = null;
         private String tempDir = null;
         private String domain = null;
@@ -2415,7 +2391,7 @@ void setCompName(String compName) {
         }
 
         void setOsName(String progName) {
-            if(this.progName == null || this.progName.isEmpty()) {
+            if(progName != null && !progName.isEmpty()) {
                 this.progName = progName;
             }
         }
-- 
GitLab