Registry keys with spaces - still an issue

Benutzeravatar
SisterOfMercy
Beiträge: 778
Registriert: 22 Jun 2012, 19:18

Registry keys with spaces - still an issue

Beitragvon SisterOfMercy » 14 Jun 2017, 03:04

A registry key with spaces cannot be opened when run in a 64-bit process.

Code: Alles auswählen

DefVar $Administrator_SID$
DefVar $escUserProfile$
Set $Administrator_SID$ = GetUserSID("Administrator")
Set $escUserProfile$ = "%" + "USERPROFILE" + "%"
Registry_local_admin_folders /SysNative

[Registry_local_admin_folders]
openkey [HKEY_USERS\$Administrator_SID$\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
set "Desktop" = REG_EXPAND_SZ:"$escUserProfile$\Desktop"
set "Personal" = REG_EXPAND_SZ:"$escUserProfile$\My Documents"


Running the Registry_local_admin_folders with the /64Bit parameter the results are the same.

Code: Alles auswählen

[5] [Jun 10 00:13:10:516] [gce-settings]     Execution of Registry_local_admin_folders
[5] [Jun 10 00:13:10:516] [gce-settings]       Error: Registry key [HKEY_USERS\S-1-5-21-538005352-711716544-1927554804-500\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]   could not be opened by RegCreateKeyEx,  Errorno: 87 "The parameter is incorrect.<"
[5] [Jun 10 00:13:10:516] [gce-settings]                   Error: Variable "Desktop"  could not be set 
[5] [Jun 10 00:13:10:516] [gce-settings]                   Error: Variable "Personal"  could not be set 


I've once opened a topic, but I didn't explain it very well back then: viewtopic.php?f=8&t=4951
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!

Zurück zu „Bugs“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast