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

AllanB

New member
Local time
10:08 AM
Messages
4
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 Computer My Computer

OS
Windows 7 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 Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Employer provided Dell Latitude
OS
W7 Pro SP1 64bit
CPU
i7
Memory
8GB
Graphics Card(s)
Intel HD Graphics
Hard Drives
crappy SSD
Antivirus
Employer mandated Symantec Endpoint Protection
Browser
Pale Moon 64bit, IE11 64bit & Chrome 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.

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 Computer My Computer

OS
Windows 7 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 Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Employer provided Dell Latitude
OS
W7 Pro SP1 64bit
CPU
i7
Memory
8GB
Graphics Card(s)
Intel HD Graphics
Hard Drives
crappy SSD
Antivirus
Employer mandated Symantec Endpoint Protection
Browser
Pale Moon 64bit, IE11 64bit & Chrome 64bit
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 Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
ACER ASPIRE 5742G
OS
Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
CPU
Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz
Motherboard
Acer Aspire 5742G
Memory
4,00 GB
Graphics Card(s)
ATI Mobility Radeon HD 5400 Series
Sound Card
(1) AMD High Definition Audio Device (2) Realtek High Defi
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
WDC WD5000BEVT-22ZAT0
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 Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
ACER ASPIRE 5742G
OS
Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
CPU
Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz
Motherboard
Acer Aspire 5742G
Memory
4,00 GB
Graphics Card(s)
ATI Mobility Radeon HD 5400 Series
Sound Card
(1) AMD High Definition Audio Device (2) Realtek High Defi
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
WDC WD5000BEVT-22ZAT0
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 Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Alienware Aurora ALX R4
OS
Windows 10 Pro (x64)
CPU
Intel Core i7-3930K (3.2GHz - 4.5GHz)
Motherboard
Alienware Aurora-R4 x79
Memory
4x Samsung 4GB PC3-12800 DDR3 (16GB 1600MHz)
Graphics Card(s)
Nvidia Geforce GTX 690
Sound Card
SteelSeries Siberia Elite
Monitor(s) Displays
Dell UltraSharp U3011
Screen Resolution
2560x1600
Hard Drives
Samsung 850 Pro 256 GB, Seagate 1TB Desktop Hybrid HDD, 2x Western Digital 4TB Green HDD
PSU
875W Some Dell PSU <.<
Case
Alienware Aurora ALX
Cooling
Custom Liquid Cooling (EK CPU & GPU blocks) dual EK 480RAD
Keyboard
Logitech G710+ Mechanical
Mouse
Logitech G700s
Internet Speed
Verizon Fios (50 mbps average)
Other Info
Server: Intel NUC D54250WYK: i5-4250U, 16GB, 256 GB mSATA, Windows Server 2012 R2
In elevated command prompt:

Code:
dir/als  c:\programdata\desktop*
dir/als  "c:\users\All Users\Desktop*"

Post output
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
ACER ASPIRE 5742G
OS
Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
CPU
Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz
Motherboard
Acer Aspire 5742G
Memory
4,00 GB
Graphics Card(s)
ATI Mobility Radeon HD 5400 Series
Sound Card
(1) AMD High Definition Audio Device (2) Realtek High Defi
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
WDC WD5000BEVT-22ZAT0
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 Computer My Computer

OS
Windows 7 64bit
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
[COLOR=red]!now press CTRL-Z[/COLOR]
cd  \programdata\desktop
copy  con  test2.txt
[COLOR=red]!now press CTRL-Z[/COLOR]
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 Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
ACER ASPIRE 5742G
OS
Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
CPU
Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz
Motherboard
Acer Aspire 5742G
Memory
4,00 GB
Graphics Card(s)
ATI Mobility Radeon HD 5400 Series
Sound Card
(1) AMD High Definition Audio Device (2) Realtek High Defi
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
WDC WD5000BEVT-22ZAT0
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
[COLOR=red]!now press CTRL-Z[/COLOR]
cd  \programdata\desktop
copy  con  test2.txt
[COLOR=red]!now press CTRL-Z[/COLOR]
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?

Yes, it works!!

C:\>cd "\users\All Users\desktop"

C:\Users\All Users\Desktop>copy con test.txt

1 file(s) copied.

C:\Users\All Users\Desktop>cd \programdata\desktop

C:\ProgramData\Desktop>
C:\ProgramData\Desktop>copy con test2.txt

1 file(s) copied.

C:\ProgramData\Desktop>dir c:\users\public\desktop
Volume in drive C is Windows
Volume Serial Number is 1E27-E7B4

Directory of c:\users\public\desktop

04/23/2013 09:19 PM 0 test.txt
04/23/2013 09:20 PM 0 test2.txt
2 File(s) 0 bytes
0 Dir(s) 31,475,945,472 bytes free

C:\ProgramData\Desktop>

I didn't bother deleting the two created files but rather modified by batch file as follows:

rem C:\Users\All Users\desktop = C:\ProgramData\desktop and they point to C:\Users\Public\Desktop which is accessible from the Command Prompt
Move C:\Users\Public\Desktop\*.* C:\Users\ALLAN\Desktop\
@echo off

and it worked perfectly via the command prompt:

E:\AB>rem C:\Users\All Users\desktop = C:\ProgramData\desktop and they point to C:\Users\Public\Desktop which is accessible from the Command Prompt

E:\AB>Move C:\Users\Public\Desktop\*.* C:\Users\ALLAN\Desktop\
C:\Users\Public\Desktop\test.txt
C:\Users\Public\Desktop\test2.txt
2 file(s) moved.


-- and I checked my desktop and the two files were moved to the right side.

Incidentally, I do this so as to keep all of my icons (except for the Recycle Bin, Computer and Control Panel) together, sorted alphabetically. Otherwise, when I would look for an icon, I would have to scan through the Public side of the desktop and the Allan side of the desktop.

Again, thank you very much, Kaktussoft, and thanks also to UsernameIssues and logicearth!!:D
 

My Computer My Computer

OS
Windows 7 64bit
Back
Top