I'd like to use SQL Server 2014 Management Studio and write a SQL statement that returns all the program files on my computer - or better yet another user's computer. But first things first....your help would be appreciated.
First I'm trying to list just my machines programs that are installed along with the current version, and PK.
I found code on-line that works (although I am not sure exactly why since I don't see a \Country List\ but I do see up to the Telephony):
EXECUTE master.dbo.xp_regread
@rootkey = 'HKEY_LOCAL_MACHINE',
@key = 'SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\1',
@value_name = 'Name';
this returns answers: 14.0, common, excel, outlook, powerpoint, word
But I want something that is a listing similar to the ControlPanel, Program and Features listing: file names, publisher, installed on, version.
I tried:
EXECUTE master.dbo.xp_regread
@rootkey = 'HKEY_LOCAL_MACHINE',
@key = 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall',
@value_name = 'DisplayName';
when I run this I get the error:
RegQueryValueEx() returned error 2, 'The system cannot find the file specified.'
Msg 22001, Level 1, State 1
(0 row(s) affected)
This also worked (just not detailed enough):
EXEC master..xp_regenumkeys
'HKEY_LOCAL_MACHINE',
'SOFTWARE\Microsoft\Office'
but I want to drill down more like
EXEC master..xp_regenumkeys
'HKEY_USERS',
'SOFTWARE\Microsoft\Office\14.0\Access\File MRU'
which returns error:
Msg 22001, Level 16, State 1, Line 5
RegOpenKeyEx() returned error 2, 'The system cannot find the file specified.'
First I'm trying to list just my machines programs that are installed along with the current version, and PK.
I found code on-line that works (although I am not sure exactly why since I don't see a \Country List\ but I do see up to the Telephony):
EXECUTE master.dbo.xp_regread
@rootkey = 'HKEY_LOCAL_MACHINE',
@key = 'SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\1',
@value_name = 'Name';
this returns answers: 14.0, common, excel, outlook, powerpoint, word
But I want something that is a listing similar to the ControlPanel, Program and Features listing: file names, publisher, installed on, version.
I tried:
EXECUTE master.dbo.xp_regread
@rootkey = 'HKEY_LOCAL_MACHINE',
@key = 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall',
@value_name = 'DisplayName';
when I run this I get the error:
RegQueryValueEx() returned error 2, 'The system cannot find the file specified.'
Msg 22001, Level 1, State 1
(0 row(s) affected)
This also worked (just not detailed enough):
EXEC master..xp_regenumkeys
'HKEY_LOCAL_MACHINE',
'SOFTWARE\Microsoft\Office'
but I want to drill down more like
EXEC master..xp_regenumkeys
'HKEY_USERS',
'SOFTWARE\Microsoft\Office\14.0\Access\File MRU'
which returns error:
Msg 22001, Level 16, State 1, Line 5
RegOpenKeyEx() returned error 2, 'The system cannot find the file specified.'