UserDataDir can't handle OS variables

%3CLINGO-SUB%20id%3D%22lingo-sub-818257%22%20slang%3D%22en-US%22%3EUserDataDir%20can't%20handle%20OS%20variables%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-818257%22%20slang%3D%22en-US%22%3E%3CP%3EI%20filled%20%22HKLM%3A%5CSOFTWARE%5CPolicies%5CMicrosoft%5CEdge%22%20%22UserDataDir%22%20with%20value%20%22%25appdata%25%5CMicrosoft%5CEdgeData%22%20but%20after%20launching%20Edge%20it%20gives%20an%20error%20that%20Edge%20can't%20create%20the%20directory.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECreated%20it%20in%20the%20same%20user%20context%20without%20an%20issue%2C%20but%20even%20then%20it%20is%20not%20working.%20Pointing%20it%20to%20a%20hard%20coded%20path%20like%20C%3A%5CUsers%5Cusername%5CAppData%5CRoaming%5CMicrosoft%5CEdgeData%20seems%20to%20work%20(but%20I%20can't%20predict%20the%20value%20of%20%25appdata%25).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESame%20behavior%20for%20the%20DiskCacheDir%20setting.%3C%2FP%3E%3CP%3EI%20saw%20%22%24%7Busers%7D%2F%24%7Buser_name%7D%2FEdge%22%20in%20the%20example%20value%2C%20but%20%24(users)%20also%20doesn't%20seem%20to%20work.%3C%2FP%3E%3CP%3EWould%20be%20nice%20to%20use%20vars%20like%20%25appdata%25.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-819470%22%20slang%3D%22en-US%22%3ERe%3A%20UserDataDir%20can't%20handle%20OS%20variables%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-819470%22%20slang%3D%22en-US%22%3E%3CP%3EFound%20a%20reference%20of%20the%20supported%20variables%20at%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.chromium.org%2Fadministrators%2Fpolicy-list-3%2Fuser-data-directory-variables%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.chromium.org%2Fadministrators%2Fpolicy-list-3%2Fuser-data-directory-variables%3C%2FA%3E.%20Now%20it%20is%20working%20fine!%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

I filled "HKLM:\SOFTWARE\Policies\Microsoft\Edge" "UserDataDir" with value "%appdata%\Microsoft\EdgeData" but after launching Edge it gives an error that Edge can't create the directory.

 

Created it in the same user context without an issue, but even then it is not working. Pointing it to a hard coded path like C:\Users\username\AppData\Roaming\Microsoft\EdgeData seems to work (but I can't predict the value of %appdata%).

 

Same behavior for the DiskCacheDir setting.

I saw "${users}/${user_name}/Edge" in the example value, but $(users) also doesn't seem to work.

Would be nice to use vars like %appdata%.

1 Reply
Highlighted

Found a reference of the supported variables at https://www.chromium.org/administrators/policy-list-3/user-data-directory-variables. Now it is working fine!