3

I created a registry item in a GPO of REG_EXPAND_SZ type with value "%userprofile%\Shares". The problem is, when the GPO is aplied, the value is created with the data "C:\Users\Default\Shares". Is there a way to mantain the value "%userprofile%\Shares" without automatically replacing the variable inside it?

2 Answers 2

1

See if this helps:

"%<userprofile>%\Shares"

1
0

Found the answer here https://sdmsoftware.com/forums/topic/escaping-env-variable-while-using-gpp/

You can insert <> between the variable name to prevent auto resolution, so instead of using %userprofile%, I used %<userprofile>% and it worked!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .