Registry keys with spaces - still an issue

Benutzeravatar
SisterOfMercy
Beiträge: 849
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!

Benutzeravatar
n.wenselowski
Beiträge: 2488
Registriert: 04 Apr 2013, 12:15

Re: Registry keys with spaces - still an issue

Beitragvon n.wenselowski » 03 Jul 2017, 17:10

Hi SisterOfMercy,

thank you for bringing this to our attention - again!

SisterOfMercy hat geschrieben:I've once opened a topic, but I didn't explain it very well back then: viewtopic.php?f=8&t=4951

I did open an internal ticket referencing to this with your proposed fix attached.
I assume that there probably will be more lines that need a fix like the one in the old topic applied.


With kind regards

Niko
Kein Support per DM!
_________________________
opsi support - uib gmbh
For productive opsi installations we recommend support contracts.


Zurück zu „Bugs“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast