James Hawkins : msi: Deformat the service name and display name when installing the service.
Alexandre Julliard
julliard at winehq.org
Wed Mar 12 06:44:25 CDT 2008
Module: wine
Branch: master
Commit: de4cab20a8be723414461213382014d0229e9af5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=de4cab20a8be723414461213382014d0229e9af5
Author: James Hawkins <jhawkins at codeweavers.com>
Date: Tue Mar 11 18:08:57 2008 -0500
msi: Deformat the service name and display name when installing the service.
---
dlls/msi/action.c | 9 ++++++---
dlls/msi/tests/install.c | 6 ++++--
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index cfef958..2e5b8ee 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -4470,7 +4470,8 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param)
MSIRECORD *row;
MSIFILE *file;
SC_HANDLE hscm, service = NULL;
- LPCWSTR name, disp, comp, depends, pass;
+ LPCWSTR comp, depends, pass;
+ LPWSTR name, disp;
LPCWSTR load_order, serv_name, key;
DWORD serv_type, start_type;
DWORD err_control;
@@ -4497,8 +4498,8 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param)
if (depends && *depends)
FIXME("Dependency list unhandled!\n");
- name = MSI_RecordGetString(rec, 2);
- disp = MSI_RecordGetString(rec, 3);
+ deformat_string(package, MSI_RecordGetString(rec, 2), &name);
+ deformat_string(package, MSI_RecordGetString(rec, 3), &disp);
serv_type = MSI_RecordGetInteger(rec, 4);
err_control = MSI_RecordGetInteger(rec, 6);
load_order = MSI_RecordGetString(rec, 7);
@@ -4536,6 +4537,8 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param)
done:
CloseServiceHandle(service);
CloseServiceHandle(hscm);
+ msi_free(name);
+ msi_free(disp);
return ERROR_SUCCESS;
}
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index 00cd705..0c3ae20 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -146,7 +146,9 @@ static const CHAR property_dat[] = "Property\tValue\n"
"Setup\tSetup\n"
"UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\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"
"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"
"s72\ts255\tL255\ti4\ti4\ti4\tS255\tS255\tS255\tS255\tS255\ts72\tL255\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"
"s72\tl255\ti2\tL255\tI2\ts72\n"
More information about the wine-cvs
mailing list