Skip to content

Commit 7ddc79e

Browse files
authored
Merge pull request #3050 from andreasjordan/2836_RegOpenKeyEx
sp_Blitz: Suppress message if registry key not found
2 parents 27d9fe9 + fc1c5dc commit 7ddc79e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sp_Blitz.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8816,7 +8816,8 @@ IF @ProductVersionMajor >= 10 AND NOT EXISTS ( SELECT 1
88168816
EXEC master.sys.xp_regread @rootkey = 'HKEY_LOCAL_MACHINE',
88178817
@key = 'SOFTWARE\Policies\Microsoft\Power\PowerSettings',
88188818
@value_name = 'ActivePowerScheme',
8819-
@value = @outval OUTPUT;
8819+
@value = @outval OUTPUT,
8820+
@no_output = 'no_output';
88208821

88218822
IF @outval IS NULL /* If power plan was not set by group policy, get local value [Git Hub Issue #1620]*/
88228823
EXEC master.sys.xp_regread @rootkey = 'HKEY_LOCAL_MACHINE',

0 commit comments

Comments
 (0)