VMware Horizon Community
rsaulitis
Enthusiast
Enthusiast

Windows 10 (1909) Redirecting Downloads failed

Hi All,

Any idea why DEM cannot redirect Download folder? In logs I can see:

2020-02-19 07:57:37.318 [WARN ] Redirected 'Downloads' folder to '\\path_to_share\%username%\Downloads' but initialization failed with error 0x8007001f ('User Profile redirection - Lietotaju atbalsta nodala.xml')

All other folders like Desktop, Documents, Music, Pictures, Videos are successfully redirected as I can see from log file.

23 Replies
Alex_Romeo
Leadership
Leadership

Hi,

try applying this solution and see if it solves your problem, even if it's not just the redirection of the "Downloads" folder that doesn't work for you.

ARomeo

Blog: https://www.aleadmin.it/
DEMdev
VMware Employee
VMware Employee

Hi rsaulitis,

Alessandro's troubleshooting suggestions don't apply in this case.

If you see that warning, the folder should still be redirected correctly – it's just that Windows encountered an issue trying to "initialize" the target folder, which probably means that something went wrong with creating the hidden Desktop.ini file (used to localize the folder name.)

Can you confirm that the folder has indeed be redirected to the target location?

Does this happen always? For all users? Does the target "Downloads" folder already exist?

Reply
0 Kudos
rsaulitis
Enthusiast
Enthusiast

Hi DEMdev,

Yes indeed folder is redirected, tested.

As I see from logs this error event occurs on every logon on both situations, when there is no profile on share and when folder already exist on destination, for all users.

Reply
0 Kudos
DEMdev
VMware Employee
VMware Employee

Hi rsaulitis,

What type of Windows user profiles are you using? How did you create your "base" profile? Any tweaks?

Would you be able to provide a ProcMon trace of a logon in which this issue occurs?

Reply
0 Kudos
rsaulitis
Enthusiast
Enthusiast

DEMdev

I used guide from techzone to prepare and optimize image, as I remember there was told to use standard user profile and not to use mandatory profiles. I did step by step configuration including OS optimization tool. Now I see they have updated guide on 30.01.2020, but I used guide from 10.10.2020, as I can see from changelog.

I could try to give ProcMon trace log, but I'm not familiar with this tool and I don't know how to run so it's capture all necessary information at logon.

Reply
0 Kudos
Alex_Romeo
Leadership
Leadership

Hi,

You used the %username% path which is for Windows 7, it doesn't work on Windows 10. The variable in windows 10 is called %userprofile%

change the path to:  %userprofile%\Downloads

ARomeo

Blog: https://www.aleadmin.it/
Reply
0 Kudos
DEMdev
VMware Employee
VMware Employee

Hi rsaulitis,

Sounds like your image has been created properly. I just wanted to check, as we've seen some folder redirection-related issues in the past where people had been a bit too aggressive in "optimizing" the default profile Smiley Happy

ProcMon is a Microsoft tool that captures all registry and file system activity. PsExec is another Microsoft tool that we can use to run ProcMon non-interactively in the system account while a normal logon takes place, using steps similar to the following:

  • Log on to the console with an admin account
  • Copy PSExec.exe and ProcMon.exe to folder C:\X
  • Run C:\X\PSExec.exe -accepteula -sd C:\X\ProcMon.exe -accepteula -quiet -backingfile C:\X\Log.PML
  • Log off
  • Log on "the normal way", with your test user
  • From an elevated prompt, run C:\X\PSExec.exe -accepteula -s C:\X\ProcMon.exe -accepteula -quiet -terminate

C:\X\Log.PML (and potentially a few additional .PML files, if there were a lot of events) should provide us some insight into what exactly is going on. You can analyze it in ProcMon, but I'd be happy to take a look as well.

NOTE: ProcMon traces contain user names, environment info, etc, so do not share them publicly. You can send me a private message with a link to your PML file(s), or you can open a support case with VMware, send the file(s) to our support team, and let me know the SR# so I can pick it up from there.

DEMdev
VMware Employee
VMware Employee

Alessandro,

You used the %username% path which is for Windows 7, it doesn't work on Windows 10. The variable in windows 10 is called %userprofile%

That is incorrect. %username% is valid for all versions of Windows. %userprofile% is a completely different variable which should definitely not be used here...

Reply
0 Kudos
Alex_Romeo
Leadership
Leadership

Hi

I tried and with %username% it doesn't work ... while with %userprofile% it works. I did the test on both Windows 7 and Windows 10.

do it too and then you give me feedback.

Blog: https://www.aleadmin.it/
Reply
0 Kudos
sjesse
Leadership
Leadership

Your doing something wrong then, username is just the name, user profile shows where the profile is stored.

pastedImage_0.png

sjesse
Leadership
Leadership

We should see if we can get a guide on techzone for this, procmon is a critical troubleshooting step for both DEM and Appvolumes that isn't explained that well in alot of places. I learned to use it by banging my head against the wall till it stopped hurting Smiley Happy

DEMdev
VMware Employee
VMware Employee

Hi sjesse,

We should see if we can get a guide on techzone for this, procmon is a critical troubleshooting step for both DEM and Appvolumes that isn't explained that well in alot of places.

One of my colleagues documented the steps, planning to have it turned into a KB article. Doesn't seem to have happened yet, so I'll ping the powers that be. Thank you for the suggestion/reminder!

I learned to use it by banging my head against the wall till it stopped hurting

Smiley Happy

DEMdev
VMware Employee
VMware Employee

Hi Alessandro,

I tried and with %username% it doesn't work ... while with %userprofile% it works. I did the test on both Windows 7 and Windows 10.

What test did you do, exactly?

Substituting %userprofile% for the %username% reference in OP's log fragment:

2020-02-19 07:57:37.318 [WARN ] Redirected 'Downloads' folder to '\\path_to_share\%username%\Downloads' but initialization failed with error 0x8007001f ('User Profile redirection - Lietotaju atbalsta nodala.xml')

would result in an effective path of \\path_to_share\C:\Users\username\... – that obviously won't work.

Reply
0 Kudos
Alex_Romeo
Leadership
Leadership

this doesn't work for sure:

\\path_to_share\C:\Users\username\..

I said this:

\\path_to_share\%userprofile%\Downloads

There are no problems, you probably know more about this topic. Let me know how it resolves which can always be helpful. Thank you

Blog: https://www.aleadmin.it/
Reply
0 Kudos
sjesse
Leadership
Leadership

if you go to a cmd prompt and type in echo %userprofile% what shows up? For me %userprofile% shows what I shared before, anything that uses will rewrite \\path_to_share\%userprofile%\Downloads to whatever %userprofile% redirects to. If it works for as %userprofile% maybe you changed that somehow

Reply
0 Kudos
rsaulitis
Enthusiast
Enthusiast

Hi DEMdev​,

I have captured all necessary information with ProcMon. I will send you private message to logs.

P.S

Logs are big :smileygrin:

Reply
0 Kudos
DEMdev
VMware Employee
VMware Employee

Hi rsaulitis,

I've downloaded your ProcMon trace, and I can see "proof" for the issue you encounter. Not that I doubted you; just to make sure the ProcMon log contains the information I need Smiley Happy

I most probably won't have time today to dive into this, but I'll keep you posted. Either in this thread, or by private message (in case of PII.)

Reply
0 Kudos
DEMdev
VMware Employee
VMware Employee

Hi rsaulitis,

I've analyzed the ProcMon trace you took. Unfortunately, the collected stack traces don't have FlexEngine.dll (that happens sometimes, for reasons unknown) which made it a bit harder to troubleshoot.

But even without those extra details: for each of the folders that need to be redirected, FlexEngine performs exactly the same Windows calls. Windows performs exactly the same additional calls behind the scenes. It's just that the Windows function that takes care of the "Desktop.ini" file for some reason (file server, antivirus interference, ?) gets a different result code for the "Downloads" folder, which means that it won't create that file, and DEM subsequently logs that "redirected successfully, but error initializing" message.

pastedImage_1.png

("CreateFile" in this case tries to create the directory on the UNC path; "NAME COLLISION" corresponds with "folder exists", which the calling code can deal with successfully.)

I'm not really sure how to proceed, I'm afraid. If you don't mind, could you try a few things for a test user?

  • Redirect the Downloads folder to a local folder. Something like:
    pastedImage_13.png
  • Redirect the Downloads folder to \\Same\UNC\Path\%USERNAME%\TestFolder instead of ...\Downloads.
GTO455
Enthusiast
Enthusiast

Hello,

 

Was this ever resolved? I'm seeing the same thing in my DEM (9.9) logs with Windows 10 1909 and Horizon 7.10.

 

Thanks!

Reply
0 Kudos