Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/sapi/token.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/sapi/token.c b/dlls/sapi/token.c index 04fa3a25d6a..ec1cce5f462 100644 --- a/dlls/sapi/token.c +++ b/dlls/sapi/token.c @@ -942,7 +942,10 @@ static HRESULT WINAPI token_SetId( ISpObjectToken *iface, hr = parse_cat_id( token_id, &root, &subkey ); if (hr != S_OK) return SPERR_NOT_FOUND;
- res = RegOpenKeyExW( root, subkey, 0, KEY_ALL_ACCESS, &key ); + if (create) + res = RegCreateKeyExW( root, subkey, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL); + else + res = RegOpenKeyExW( root, subkey, 0, KEY_ALL_ACCESS, &key ); if (res) return SPERR_NOT_FOUND;
This->token_key = key;