Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: All Users Desktop Files "Not Found" (Dir *.*) in Elevated Cmd Prompt

21 Apr 2013   #1

Windows 7 64bit
 
 
All Users Desktop Files "Not Found" (Dir *.*) in Elevated Cmd Prompt

Re: Windows 7, SP1, Home Premium, 64-bit

When using Q-Dir, a 4-pane Windows Explorer replacement, I can manually move desktop files/icons between the all users a/c and my account. I created a batch file to do this, and it works fine when clicked from within Q-Dir. It does not, however work from a command prompt, even an elevated command prompt.

At the elevated command prompt, even the Dir *.* command results in a file not found error message, even though files are actually there (and are not hidden files).

This is the simple batch file:

rem C:\Users\All Users\desktop = C:\ProgramData\desktop
Move C:\ProgramData\Desktop\*.* C:\Users\ALLAN\Desktop\
@echo off

Incidentally, changing the permissions, to allow full control in the properties/security settings for the All Users desktop does not have any effect with respect to this issue.

Does anyone know why the elevated command prompt cannot access/find the files in the All Users desktop ("File not found" error message)?

Again, I can do this via my Windows Explorer replacement, so it is not really a problem, but it has me baffled; thus my request for help.

Thanks.

Allan

My System SpecsSystem Spec
.

23 Apr 2013   #2

W7 Pro SP1 64bit
 
 

The common desktop is located here:
C:\Users\Public\Desktop


C:\ProgramData\Desktop and\or C:\Users\All Users\Desktop is not where you should be working.
My System SpecsSystem Spec
23 Apr 2013   #3

Windows 7 64bit
 
 

Quote   Quote: Originally Posted by UsernameIssues View Post
The common desktop is located here:
C:\Users\Public\Desktop


C:\ProgramData\Desktop and\or C:\Users\All Users\Desktop is not where you should be working.
Thanks for your reply.

The problem is, that when I install some software (but not most), the desktop shortcut does NOT go to C:\Users\Public\Desktop but rather to the one listed as "All Users" which is shown, as far as path, as C:\Programdata\Desktop.

I tested C:\Users\Public\Desktop by copying a file there sorting the destop and the shortcut for the file was sorted to the leftmost icons section of the desktop (the "public" section, where the recycle bin shortcut appears). At a command prompt, I very easily was able to move the shortcut from the public portion of the desktop to the "Allan" portion of the desktop, without any problems.

However, as I said, when programs install and create a desktop icon shortcut and do not put it in C:\Users\Allan\Desktop, but automatically put it in "All Users", it is then that I can only move the shortcut within Windows, via my Windows Explorer replacement because the Command Prompt will not "find" any files in the "All Users" or ProgramData desktop.

Incidentally, somehow the "All Users" Desktop listing in my Windows Explorer got changed -- it had a lock icon but in my trying to change something, I forgot, probably permissions, it got changed to the shortcut arrow icon. However, that does does not seem to matter, because at an elevated command prompt the result is still "file not found" even when a file is there. Again, I can only move the file from there via my Windows Explorer replacement, when it is run as an administrator.

Is there a way that I can change a setting so that C:\Users\Public rather than C:\Users\All Users is designated to be used by those programs that automatically install and create a desktop icon in All Users? If so, how?

Thanks.
My System SpecsSystem Spec
.


23 Apr 2013   #4

W7 Pro SP1 64bit
 
 

You can use your favorite search engine to learn about:
NTFS Junction Points
NTFS Symbolic Links
Hard links

Even though these articles talk about Vista, the concepts are the same:
Junction Points (Windows)
Application Compatibility: Junction Points and Backup Applications

I don't fully understand these myself - so no use in my attempting to explain them to you.

My guess is that programs would not be installing shortcuts to the wrong place if the NTFS permissions had been left alone. There may be an easy fix. There may be some batch file somewhere that can restore the NTFS permissions to their original state... I just don't know where to get such a batch file. One solution would be to do a clean install of the operating system - then leave well enough alone. :-)
My System SpecsSystem Spec
23 Apr 2013   #5

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

Map van C:\Users\All Users
14-07-2009 07:08 <KOPPELING> Application Data [C:\ProgramData]
14-07-2009 07:08 <KOPPELING> Desktop [C:\Users\Public\Desktop]
14-07-2009 07:08 <KOPPELING> Documents [C:\Users\Public\Documents]
14-07-2009 07:08 <KOPPELING> Favorites [C:\Users\Public\Favorites]
14-07-2009 07:08 <KOPPELING> Start Menu [C:\ProgramData\Microsoft\Windows
\Start Menu]
14-07-2009 07:08 <KOPPELING> Templates [C:\ProgramData\Microsoft\Windows\
Templates]

C:\Users\All Users\Desktop = C:\Users\Public\Desktop
My System SpecsSystem Spec
23 Apr 2013   #6

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

Map van C:\ProgramData
14-07-2009 07:08 <KOPPELING> Application Data [C:\ProgramData]
14-07-2009 07:08 <KOPPELING> Desktop [C:\Users\Public\Desktop]
14-07-2009 07:08 <KOPPELING> Documents [C:\Users\Public\Documents]
14-07-2009 07:08 <KOPPELING> Favorites [C:\Users\Public\Favorites]
14-07-2009 07:08 <KOPPELING> Start Menu [C:\ProgramData\Microsoft\Windows
\Start Menu]
14-07-2009 07:08 <KOPPELING> Templates [C:\ProgramData\Microsoft\Windows\
Templates]

C:\ProgramData\Desktop = C:\Users\Public\Desktop
My System SpecsSystem Spec
23 Apr 2013   #7

Windows 8.1 Pro (x64)
 
 

The only reason you would be having this issue is if you destroyed the junction points and then recreated the folders as real folders. Or messed with them in any other way like changing their permissions. Those junctions deny access for a reason, by changing those access rules you are creating this mess.
My System SpecsSystem Spec
23 Apr 2013   #8

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

In elevated command prompt:

Code:
 
dir/als  c:\programdata\desktop*
dir/als  "c:\users\All Users\Desktop*"
Post output
My System SpecsSystem Spec
23 Apr 2013   #9

Windows 7 64bit
 
 

Quote   Quote: Originally Posted by Kaktussoft View Post
In elevated command prompt:

Code:
 
dir/als  c:\programdata\desktop*
dir/als  "c:\users\All Users\Desktop*"
Post output
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Windows\system32>dir/als c:\programdata\desktop*
Volume in drive C is Windows
Volume Serial Number is 1E27-E7B4

Directory of c:\programdata

07/14/2009 01:08 AM <JUNCTION> Desktop [C:\Users\Public\Desktop]
0 File(s) 0 bytes
1 Dir(s) 31,501,836,288 bytes free

C:\Windows\system32>
C:\Windows\system32>dir/als "c:\users\All Users\Desktop*"
Volume in drive C is Windows
Volume Serial Number is 1E27-E7B4

Directory of c:\users\All Users

07/14/2009 01:08 AM <JUNCTION> Desktop [C:\Users\Public\Desktop]
0 File(s) 0 bytes
1 Dir(s) 31,501,189,120 bytes free
My System SpecsSystem Spec
23 Apr 2013   #10

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

Quote   Quote: Originally Posted by AllanB View Post
Quote   Quote: Originally Posted by Kaktussoft View Post
In elevated command prompt:

Code:
 
dir/als  c:\programdata\desktop*
dir/als  "c:\users\All Users\Desktop*"
Post output
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Windows\system32>dir/als c:\programdata\desktop*
Volume in drive C is Windows
Volume Serial Number is 1E27-E7B4

Directory of c:\programdata

07/14/2009 01:08 AM <JUNCTION> Desktop [C:\Users\Public\Desktop]
0 File(s) 0 bytes
1 Dir(s) 31,501,836,288 bytes free

C:\Windows\system32>
C:\Windows\system32>dir/als "c:\users\All Users\Desktop*"
Volume in drive C is Windows
Volume Serial Number is 1E27-E7B4

Directory of c:\users\All Users

07/14/2009 01:08 AM <JUNCTION> Desktop [C:\Users\Public\Desktop]
0 File(s) 0 bytes
1 Dir(s) 31,501,189,120 bytes free
All is as it should be!!
Code:
C:
cd  "\users\All Users\desktop"
copy  con  test.txt
!now press CTRL-Z
cd  \programdata\desktop
copy  con  test2.txt
!now press CTRL-Z
Code:
dir  c:\users\public\desktop
Do you see files test.txt and test2.txt ? Delete them.

Do you see "c:\users\All Users\desktop" and c:\programdata\desktop are actually pointing to c:\users\public\desktop.

So what's the problem?
My System SpecsSystem Spec
Reply

 All Users Desktop Files "Not Found" (Dir *.*) in Elevated Cmd Prompt




Thread Tools



Similar help and support threads for2: All Users Desktop Files "Not Found" (Dir *.*) in Elevated Cmd Prompt
Thread Forum
Sony Vaio Win7 "Operating System Not Found" - missing data files General Discussion
Solved Trying to Remove a File on my Desktop - "Item not Found" General Discussion
Solved "Item not found" bug when moving or renaming files/folders General Discussion
"Resource protection found corrupt files..." General Discussion
How do I find "found"files created by CHKDSK? Performance & Maintenance
"no files have been found on this remote library" Network & Sharing
I cannot view the XP files "Desktop" "My documents" Installation & Setup

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 09:10 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33