There are some permission issues apparently (see http://community.acresso.com/archive/index.php?t-169135.html)
Here's an alternative, use the Registry entry of a service to figure out if the service is installed or not:
// Indicates if the service with this key (e.g. myNewService) has been installedfunction BOOL windowsServiceExists(serviceKey) string szKey,szServiceName; number nRootKey; begin nRootKey = HKEY_LOCAL_MACHINE;
if (RegDBSetDefaultRoot (nRootKey) <> MessageBox ("Unable to set HKEY_LOCAL_MACHINE.", SEVERE); return FALSE; endif; szKey = "SYSTEM\\CurrentControlSet\\Services\\" + serviceKey; //MessageBox("Testing for service: " + serviceKey, INFORMATION); if (RegDBKeyExist (szKey) = 1 ) then //MessageBox("found service:" + szServiceName, INFORMATION); return TRUE; endif; return FALSE;end;
No comments:
Post a Comment