cancel
Showing results for 
Search instead for 
Did you mean: 

EEDK Maconfig not populating totally. Runs locally fine

Jump to solution

With a powershell script in EEDK, I am trying to read a registry value and apply it to a Custom Properties field with maconfig. This works just fine when I run it on my machine, but not when I use an EEDK package. It is strange. This is the code
-----------------------------------------------------------------------------------
$BOOTUP = Get-WmiObject Win32_OperatingSystem | select @{LABEL=' ';EXPRESSION={$_.ConverttoDateTime($_.LastBootUpTime)}}
$path = 'HKLM:\Software\CompanyName'
$objReg = Get-ItemProperty -Path $path | Select -Property *
$BUILDVER = $objReg.Build_Version
$CustText1 = "Boot" + "$BOOTUP" + ", Build=" + "$BUILDVER"

#Output
& maconfig "-custom" "-prop1" "$CustText1"
---------------------------------------------------------------------------
The BOOT bit works fine but the BUILDVER does not show. This would be something like 10.1607.4a. It is just blank. It is also blank if I do it on its own thus

$CustText1= $BUILDVER

1 Solution

Accepted Solutions

Re: EEDK Maconfig not populating totally. Runs locally fine

Jump to solution

Turns out this was down to the permissions on the registry key. Ran OK as admin on my PC but agent did not have read rights.

2 Replies
Highlighted

Re: EEDK Maconfig not populating totally. Runs locally fine

Jump to solution

Clarification. The EEDK package seems to not read the registry value. I have tried various ways but I just cant get it to work. The even stranger thing is that the machines which have the build text registry key set to (for example) "SENA6.1.1.1.0.5" as opposed to basic numeric, seem to work. But if I use that text on my machine, it does not work. I am wondering if it is related to different powershell versions.....

Re: EEDK Maconfig not populating totally. Runs locally fine

Jump to solution

Turns out this was down to the permissions on the registry key. Ran OK as admin on my PC but agent did not have read rights.

More McAfee Tools to Help You

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community