[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 246
  • Last Modified:

How to access registry on the server from desktop

Hi,

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?
0
Stef Merlijn
Asked:
Stef Merlijn
1 Solution
 
aikimarkCommented:
* 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.
http://msdn.microsoft.com/en-us/library/aa394600(VS.85).aspx
http://www.online-admin.com/wmiset.html
0
 
Geert GruwezOracle 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;
try
  Reg.RootKey := HKEY_LOCAL_MACHINE;
  if Reg.RegistryConnect(COMPUTERNAME) then
  begin
      aKey := 'Software\Microsoft';
      if Reg.OpenKey(aKey, False) then
        //


IMO
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 !
0
 
Stef MerlijnDeveloperAuthor Commented:
Clean and simple. Thank you very much!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now