version 1.2, 2005/03/10 23:23:12
|
version 1.3, 2005/04/04 10:52:27
|
|
|
// Tony Fiorentino (fiorentino_tony@emc.com) | // Tony Fiorentino (fiorentino_tony@emc.com) |
// Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) | // Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
// Steve Hills (steve.hills@ncr.com) | // Steve Hills (steve.hills@ncr.com) |
// Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) - Bug#2032 |
// Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) - Bug#2032, 2031 |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
| |
strcpy(descriptionname, _server_proc->getDescription()); | strcpy(descriptionname, _server_proc->getDescription()); |
| |
GetModuleFileName(NULL, filename, sizeof(filename)); |
if(0 != GetModuleFileName(NULL, filename, sizeof(filename))) |
|
{ |
status = pegasus_service.Install(displayname, descriptionname, filename); | status = pegasus_service.Install(displayname, descriptionname, 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) |
|
|
home.remove(home.size()-1, 1); | home.remove(home.size()-1, 1); |
} | } |
} | } |
|
} |
return home; | return home; |
} | } |
| |