msi: Deformat the service name and display name when installing the service.
This commit is contained in:
parent
7f5c97693e
commit
de4cab20a8
|
@ -4470,7 +4470,8 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param)
|
||||||
MSIRECORD *row;
|
MSIRECORD *row;
|
||||||
MSIFILE *file;
|
MSIFILE *file;
|
||||||
SC_HANDLE hscm, service = NULL;
|
SC_HANDLE hscm, service = NULL;
|
||||||
LPCWSTR name, disp, comp, depends, pass;
|
LPCWSTR comp, depends, pass;
|
||||||
|
LPWSTR name, disp;
|
||||||
LPCWSTR load_order, serv_name, key;
|
LPCWSTR load_order, serv_name, key;
|
||||||
DWORD serv_type, start_type;
|
DWORD serv_type, start_type;
|
||||||
DWORD err_control;
|
DWORD err_control;
|
||||||
|
@ -4497,8 +4498,8 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param)
|
||||||
if (depends && *depends)
|
if (depends && *depends)
|
||||||
FIXME("Dependency list unhandled!\n");
|
FIXME("Dependency list unhandled!\n");
|
||||||
|
|
||||||
name = MSI_RecordGetString(rec, 2);
|
deformat_string(package, MSI_RecordGetString(rec, 2), &name);
|
||||||
disp = MSI_RecordGetString(rec, 3);
|
deformat_string(package, MSI_RecordGetString(rec, 3), &disp);
|
||||||
serv_type = MSI_RecordGetInteger(rec, 4);
|
serv_type = MSI_RecordGetInteger(rec, 4);
|
||||||
err_control = MSI_RecordGetInteger(rec, 6);
|
err_control = MSI_RecordGetInteger(rec, 6);
|
||||||
load_order = MSI_RecordGetString(rec, 7);
|
load_order = MSI_RecordGetString(rec, 7);
|
||||||
|
@ -4536,6 +4537,8 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param)
|
||||||
done:
|
done:
|
||||||
CloseServiceHandle(service);
|
CloseServiceHandle(service);
|
||||||
CloseServiceHandle(hscm);
|
CloseServiceHandle(hscm);
|
||||||
|
msi_free(name);
|
||||||
|
msi_free(disp);
|
||||||
|
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,7 +146,9 @@ static const CHAR property_dat[] = "Property\tValue\n"
|
||||||
"Setup\tSetup\n"
|
"Setup\tSetup\n"
|
||||||
"UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
|
"UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
|
||||||
"AdminProperties\tPOSTADMIN\n"
|
"AdminProperties\tPOSTADMIN\n"
|
||||||
"ROOTDRIVE\tC:\\\n";
|
"ROOTDRIVE\tC:\\\n"
|
||||||
|
"SERVNAME\tTestService\n"
|
||||||
|
"SERVDISP\tTestServiceDisp\n";
|
||||||
|
|
||||||
static const CHAR registry_dat[] = "Registry\tRoot\tKey\tName\tValue\tComponent_\n"
|
static const CHAR registry_dat[] = "Registry\tRoot\tKey\tName\tValue\tComponent_\n"
|
||||||
"s72\ti2\tl255\tL255\tL0\ts72\n"
|
"s72\ti2\tl255\tL255\tL0\ts72\n"
|
||||||
|
@ -160,7 +162,7 @@ static const CHAR service_install_dat[] = "ServiceInstall\tName\tDisplayName\tSe
|
||||||
"LoadOrderGroup\tDependencies\tStartName\tPassword\tArguments\tComponent_\tDescription\n"
|
"LoadOrderGroup\tDependencies\tStartName\tPassword\tArguments\tComponent_\tDescription\n"
|
||||||
"s72\ts255\tL255\ti4\ti4\ti4\tS255\tS255\tS255\tS255\tS255\ts72\tL255\n"
|
"s72\ts255\tL255\ti4\ti4\ti4\tS255\tS255\tS255\tS255\tS255\ts72\tL255\n"
|
||||||
"ServiceInstall\tServiceInstall\n"
|
"ServiceInstall\tServiceInstall\n"
|
||||||
"TestService\tTestService\tTestService\t2\t3\t0\t\t\tTestService\t\t\tservice_comp\t\t";
|
"TestService\t[SERVNAME]\t[SERVDISP]\t2\t3\t0\t\t\tTestService\t\t\tservice_comp\t\t";
|
||||||
|
|
||||||
static const CHAR service_control_dat[] = "ServiceControl\tName\tEvent\tArguments\tWait\tComponent_\n"
|
static const CHAR service_control_dat[] = "ServiceControl\tName\tEvent\tArguments\tWait\tComponent_\n"
|
||||||
"s72\tl255\ti2\tL255\tI2\ts72\n"
|
"s72\tl255\ti2\tL255\tI2\ts72\n"
|
||||||
|
|
Loading…
Reference in New Issue