msi [3/3]: Set the USERNAME and COMPANYNAME properties when
initializing a package
James Hawkins
truiken at gmail.com
Mon Oct 16 20:34:12 CDT 2006
On 10/16/06, Mike McCormack <mike at codeweavers.com> wrote:
>
> James Hawkins wrote:
>
> > + WCHAR user[MAX_PATH];
> > +
> > + size = MAX_PATH;
> > + type = REG_SZ;
> > + user[0] = '\0';
> > + res = RegQueryValueExW( hkey, szRegisteredUser, NULL, &type, (LPBYTE)user, &size );
> > + MSI_SetPropertyW( package, szUSERNAME, user );
>
> How about:
>
> LPWSTR user = msi_reg_get_val_str( hkey, szRegisteredUser ).
> MSI_SetPropertyW( package, szUserName, user );
> msi_free( user );
>
Ah these wonderful shortcuts. I should probably write them down somewhere ;)
> (All upper case is usually for macros...)
>
I'd rather keep it uppercase. The property name is uppercase and
hypothetically there could be a UserName property too, like we have
SourceDir/SOURCEDIR. I know it almost looks like a macro, but it
helps me and possibly others know at first glace that we're talking
about the USERNAME property.
Thanks,
James Hawkins
More information about the wine-devel
mailing list