Hmm, yeah that looks like it should be OK to me. Or at least nothing is jumping out.
Is it just the one user on that machine that runs into this problem or do other users get the same sort of thing?
If it’s the one user I think my next stop would be the registry:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
In there should be all of the redirects. Could be that something has gotten stuck on something and could be corrected.
If it’s multiple users I guess RSOP on that machine would be my next port of call.
Answer from davelewis56 on community.spiceworks.comHmm, yeah that looks like it should be OK to me. Or at least nothing is jumping out.
Is it just the one user on that machine that runs into this problem or do other users get the same sort of thing?
If it’s the one user I think my next stop would be the registry:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
In there should be all of the redirects. Could be that something has gotten stuck on something and could be corrected.
If it’s multiple users I guess RSOP on that machine would be my next port of call.
C:\Users%user%\Desktop refers to a location that is unavailable. . . .
This happened after i made a GPO for folder redirection. I tested it profusely, and it seemed to work just fine before i started taking baby steps/(more testing) while implementing it. So all looked good and i went for it. All machines worked out ok except one. And on this one machine, i get this error with opening just about any directory. the folder redirection worked out, but it was supposed to leave the desktop folder on the local machine too (Like all the others within the exact same policy).

IF I’m not figuring this one out tonight. This will be an annoying issue for me and the user tomorrow.
Windows gives me an error when I am trying to cd into "\\?\C:\Users\%Username%\Desktop" because it does not exist for some reason, but when I am trying to create it with mkdir "\\?\C:\Users\%Username%\Desktop" it gives me an error because the folder already exists.
btw: chkdsk /f does nothing against it
C:\Users\<Username>\Desktop is not accessible
Desktop files showing as C:/user/Name/ONEDRIVE/Desktop ? | Tom's Hardware Forum
Topic: win 11 starts to public desktop not user desktop @ AskWoody
"Windows 11 Desktop Folder Properties Location Set to C: / User / Username
It's the CommonDesktopDirectory special folder and most of the time it's:
C:\Users\Public\Desktop
To find out the directory for your system, run in a PowerShell prompt:
[Environment]::GetFolderPath('CommonDesktopDirectory')
In Windows 10 Login as Administrator (Local Admin).
Go to Control Panel > File Explorer Options > click on the View tab > under Advanced settings: look for hidden files and folders > choose "Show hidden files, folders, and drives" and click "OK".
Go to C drive (C:) > Users > Public > Public Desktop
The "public desktop" folder is normally a hidden folder.
Now you can put your shortcuts in: C:\Users\Public\Desktop
Hello Sufiyan Mogal
To change the location of your Desktop folder back to its default location, please follow these steps:
- Right-click on the Desktop folder in File Explorer and select Properties.
- Click on the Location tab.
- Click on the Restore Default button.
- Click on Yes to confirm the change.
- Click on OK to close the Properties window.
This should restore the Desktop folder to its default location of C:\Users\USERNAME\Desktop. If you have any files or folders that were saved to the previous location, you will need to move them to the new location manually.
Hope it helps.
Best Regards,
Hania Lian
Hello,
Look at this location in the registry:
Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
Under that key look for the Desktop value.
Darrell
You may have to run your program/IDE as Administrator to access that folder, due to how Windows default permissions work.
For more context:
The path leads to a folder - not a file. I believe FileStreams in C-based languages must actually point to a file, rather than a directory: ie. C:\Users\Username\Desktop\file.extension
Probably you don't realize that you are trying to open the Desktop folder and then trying to use it as a file.
If your intent is to write the bytes of the image to your database then your code should be
fsrw = new FileStream(fname , FileMode.Open, FileAccess.ReadWrite);