version 1.13, 2005/02/24 20:09:08
|
version 1.14, 2005/04/04 10:52:26
|
|
|
// Jair Santos, Hewlett-Packard Company (jair.santos@hp.com) | // Jair Santos, Hewlett-Packard Company (jair.santos@hp.com) |
// Dan Gorey, IBM (djgorey@us.ibm.com) | // Dan Gorey, IBM (djgorey@us.ibm.com) |
// Mateus Baur, Hewlett-Packard Company (mateus.baur@hp.com) | // Mateus Baur, Hewlett-Packard Company (mateus.baur@hp.com) |
|
// Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#2031 |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
sprintf(displayname, "%s - %s", PEGASUS_DISPLAY_NAME, service_name); | sprintf(displayname, "%s - %s", PEGASUS_DISPLAY_NAME, service_name); |
} | } |
| |
GetModuleFileName(NULL, filename, sizeof(filename)); |
if(0 != GetModuleFileName(NULL, filename, sizeof(filename))) |
|
{ |
status = pegasus_service.Install(displayname, PEGASUS_DESCRIPTION, filename); | status = pegasus_service.Install(displayname, PEGASUS_DESCRIPTION, filename); |
| |
// Upon success, set home in registry | // Upon success, set home in registry |
|
|
pegasus_homepath[strlen(pegasus_homepath)-1] = '\0'; | pegasus_homepath[strlen(pegasus_homepath)-1] = '\0'; |
_setRegInfo(g_cimservice_home, pegasus_homepath); | _setRegInfo(g_cimservice_home, pegasus_homepath); |
} | } |
|
} |
|
else |
|
{ |
|
status = (Service::ReturnCode) GetLastError(); |
|
} |
| |
return (status == Service::SERVICE_RETURN_SUCCESS) ? true : false; | return (status == Service::SERVICE_RETURN_SUCCESS) ? true : false; |
} | } |
|
|
// Determine the absolute path to the running program | // Determine the absolute path to the running program |
char exe_pathname[_MAX_PATH] = {0}; | char exe_pathname[_MAX_PATH] = {0}; |
char home_pathname[_MAX_PATH] = {0}; | char home_pathname[_MAX_PATH] = {0}; |
GetModuleFileName(NULL, exe_pathname, sizeof(exe_pathname)); |
if(0 != GetModuleFileName(NULL, exe_pathname, sizeof(exe_pathname))) |
|
{ |
| |
// Pegasus home search rules: | // Pegasus home search rules: |
// - look in registry (if set) | // - look in registry (if set) |
|
|
} | } |
} | } |
} | } |
|
} |
| |