@@ -338,6 +338,8 @@ public ValueType DataType
338
338
return ValueType . String ;
339
339
if ( _value . ToLower ( ) . StartsWith ( "dword:" ) )
340
340
return ValueType . DWord ;
341
+ if ( _value . ToLower ( ) . StartsWith ( "hex(b):" ) )
342
+ return ValueType . QWord ;
341
343
if ( _value . ToLower ( ) . StartsWith ( "qword:" ) )
342
344
return ValueType . QWord ;
343
345
if ( _value . ToLower ( ) . StartsWith ( "hex(7):" ) )
@@ -557,11 +559,34 @@ public string GetPSCheckAll(string PSHive)
557
559
{
558
560
string sResult = "# " + Description + Environment . NewLine ;
559
561
560
- foreach ( RegValue oVal in RegValues . Where ( t => t . Key . PSHive == PSHive ) )
562
+ if ( PSHive == "HKLM:" )
561
563
{
562
- sResult = sResult + oVal . PSCheck . Replace ( "$true" , "" ) . Replace ( "$false" , "return $false" ) + ";" + Environment . NewLine ;
564
+ foreach ( RegValue oVal in RegValues . Where ( t => t . Key . PSHive != "HKCU:" ) )
565
+ {
566
+ if ( ! string . IsNullOrEmpty ( oVal . Description ) )
567
+ {
568
+ sResult += Environment . NewLine ;
569
+ sResult += "# " + oVal . Description + Environment . NewLine ;
570
+ }
571
+
572
+ sResult = sResult + oVal . PSCheck . Replace ( "$true" , "" ) . Replace ( "$false" , "return $false" ) + ";" + Environment . NewLine ;
573
+ }
574
+ sResult += "return $true" ;
575
+ }
576
+ else
577
+ {
578
+ foreach ( RegValue oVal in RegValues . Where ( t => t . Key . PSHive == "HKCU:" ) )
579
+ {
580
+ if ( ! string . IsNullOrEmpty ( oVal . Description ) )
581
+ {
582
+ sResult += Environment . NewLine ;
583
+ sResult += "# " + oVal . Description + Environment . NewLine ;
584
+ }
585
+
586
+ sResult = sResult + oVal . PSCheck . Replace ( "$true" , "" ) . Replace ( "$false" , "return $false" ) + ";" + Environment . NewLine ;
587
+ }
588
+ sResult += "return $true" ;
563
589
}
564
- sResult += "return $true" ;
565
590
return sResult ;
566
591
}
567
592
0 commit comments