How to access registry on the server from desktop

Posted on 2008-11-09
Last Modified: 2012-05-05

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?
Question by:Delphiwizard
    LVL 44

    Expert Comment

    * 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.
    LVL 36

    Accepted Solution

    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;
      Reg.RootKey := HKEY_LOCAL_MACHINE;
      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 !

    Author Closing Comment

    Clean and simple. Thank you very much!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Want to promote your upcoming event?

    Is your company attending an event or exhibiting at a trade show soon? Are you speaking at a conference? Spread the word by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

    Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
    This is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
    The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
    With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now