"Lei Zhang" thestig@google.com writes:
- {
char expand[MAX_PATH];
strcpy(command, "foobar");
strcpy(filename, "foo.msi");
file = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
ok(file != INVALID_HANDLE_VALUE, "Failure to open file %s\n", filename);
CloseHandle(file);
ok(ExpandEnvironmentStringsA("\%systemroot\%\\system32\\msiexec.exe", expand, MAX_PATH) != 0, "ExpandEnvironmentStringsA failed\n");
Again, please don't hardcode system32, use GetSystemDirectory instead.