1

I am trying to use Group policy preferences to deploy a registry key that has an empty space as its only value (one press of the space bar).

I am using: User Configuration -> Preferences -> Windows Settings –> Registry

The DC's are W2008R2.

If I enter a space in the ‘Value data’ field, it accepts that without quibble. But when I close that dialogue box and open it again, the field is empty (the cursor is at the far left of the field). Entering a space in double quotes results in a registry value of exactly that, two quote marks with a space between them, which is quite amusing but not what I am looking for.

*

For those interested in the why of it, it is to define a thousand’s separator so that numbers exported from Navision to Excel math properly.

I live in a region that uses space as a thousand’s separator. And yes, Windows regional and language options sets that up for me automatically. But (and here it gets a bit odd), that is a non line breaking space. Which is quite appropriate for creating documents; if you write the number 10 000 you don’t want those three zeroes orphaned on the next line. But it also results in Excel not treating numbers > three digits exported from Nav as numbers. Hence this.

I realize I might have to script it, but I prefer to use this method if at all possible.

Stefan
  • 11
  • 1
  • Is the Value Type a REG_DWORD or REG_SZ? I wonder if you set it to DWORD and plug in "20" as the hex value if that would work? – MikeAWood May 13 '14 at 20:45

1 Answers1

0

Sorry to revive this old thread, but this is still a relevant problem in 2022 :)

The way I solved this is set it as it is, then go to your group policy to find the unique ID of the GPO. It's in the Details pane of the GPO itself and looks something like this: {12345678-FCUK-4321-1234-12345678FCUK} Your ID will be unique, so pay attention.

Then make note of the domain at the top. In my case it's domain.test.

In file explorer, navigate to \\domain.test\SYSVOL\domain.test\Policies{12345678-FCUK-4321-1234-12345678FCUK}\User\Preferences\Registry

Edit the Registry.xml file with notepad

Find the line starting with <Registry clsid="{12345678-FCUK-4321-1234-12345678FCUK}" name="sThousand" At the end of this you will find your value="" Simply replace that with value=" " and save the file.

Run GPUpdate on your test client and verify you don't get any errors on the client when you go to Control Panel\Clock and Region\Region[Additional settings...]\Currency

With your previous setup you would've gotten an error there, and it wouldn't have shown the Positive / Negative values because you were missing a Digit grouping symbol.

Thomas M
  • 1
  • 1