lstrProcessName := "Registry Value Query:"; REM {Variables to define where in the registry to look by default:}; lstrRegKeyDefault := "HKEY_CURRENT_USER"; lstrRegKeyChoices := "HKEY_CURRENT_USER": "HKEY_LOCAL_MACHINE"; lstrRegSubKeyDefault := "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"; lstrRegValueDefault := "Favorites"; REM {Get user choices of where in the registry to look:}; lstrRegKey := @Prompt( [OkCancelCombo]; lstrProcessName; "Select primary Key to search:"; lstrRegKeyDefault; lstrRegKeyChoices ); lstrRegSubKey := @Prompt( [OkCancelEdit]; lstrProcessName; "Enter sub-Key to search under " + lstrRegKey + ":"; lstrRegSubKeyDefault ); lstrRegValueName := @Prompt( [OkCancelEdit]; lstrProcessName; "Enter Value to display from " + lstrRegKey + " \\ " + @ReplaceSubstring( lstrRegSubKey; "\\"; " \\ " ) + ":"; lstrRegValueDefault ); lstrRegistryValue := @RegQueryValue( lstrRegKey; lstrRegSubKey; lstrRegValueName ); REM {Return the result:}; @If( @IsError( lstrRegistryValue ); @Prompt( [Ok]; lstrProcessName; "An error occurred attempting to read " + lstrRegKey + "\\" + lstrRegSubKey + "\\" + lstrRegValueName + "." ) ; @If( lstrRegistryValue = ""; @Prompt( [Ok]; lstrProcessName; lstrRegKey + "\\" + lstrRegSubKey + "\\" + lstrRegValueName + " is empty, or returned null." ) ; @Prompt( [Ok]; lstrProcessName; lstrRegKey + "\\" + lstrRegSubKey + "\\" + lstrRegValueName + " contains '" + lstrRegistryValue + "'." ) ) )