How to access registry on the server from desktop


My delphi application will be installed on a server. An enduser will use a shortcut on their desktop to run the executable on the server.
My application will o.a. check if SQL Server is installed in the registry, but when I check the registry, it will always check the registry on the desktop in stead of on the server.

Is there a way to make sure the application will check the registry on the server?
Stef MerlijnDeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

* TRY to open a SQL Server connection and trap any failure.  (simplest)
* What data does the server registry contain that you couldn't place in the application directory?
* Maybe you could look for other things on the client that would indicate an ability to connect to the server, such as ODBC definitions.
* use WMI to access registry entries.
Geert GOracle dbaCommented:
you can access a registry  on another from Delphi like this:
off course, this only works if the user has priviliges for this

uses Registry;

Reg := TRegistry.Create;
  if Reg.RegistryConnect(COMPUTERNAME) then
      aKey := 'Software\Microsoft';
      if Reg.OpenKey(aKey, False) then

An enduser will use a shortcut on their desktop to run the executable on the server
The executable is not run on the server if started on the clients desktop,
but on this client itself !

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Stef MerlijnDeveloperAuthor Commented:
Clean and simple. Thank you very much!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.