static const WCHAR szUserLangID[] = {'U','s','e','r','L','a','n','g','u','a','g','e','I','D',0};
static const WCHAR szSystemLangID[] = {'S','y','s','t','e','m','L','a','n','g','u','a','g','e','I','D',0};
static const WCHAR szProductState[] = {'P','r','o','d','u','c','t','S','t','a','t','e',0};
static const WCHAR szUserLangID[] = {'U','s','e','r','L','a','n','g','u','a','g','e','I','D',0};
static const WCHAR szSystemLangID[] = {'S','y','s','t','e','m','L','a','n','g','u','a','g','e','I','D',0};
static const WCHAR szProductState[] = {'P','r','o','d','u','c','t','S','t','a','t','e',0};
sprintfW(bufstr, szIntFormat, MsiQueryProductStateW(package->ProductCode));
MSI_SetPropertyW( package, szProductState, bufstr );
sprintfW(bufstr, szIntFormat, MsiQueryProductStateW(package->ProductCode));
MSI_SetPropertyW( package, szProductState, bufstr );
+
+ len = 0;
+ if (!GetUserNameW( NULL, &len ) && GetLastError() == ERROR_MORE_DATA)
+ {
+ WCHAR *username;
+ if ((username = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )))
+ {
+ if (GetUserNameW( username, &len ))
+ MSI_SetPropertyW( package, szLogonUser, username );
+ HeapFree( GetProcessHeap(), 0, username );
+ }
+ }