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

Page 1 of 2 12 LastLast

  1. Posts : 4
    Windows 7 64bit
       #1

    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


  2. Posts : 10,485
    W7 Pro SP1 64bit
       #2

    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


  3. Posts : 4
    Windows 7 64bit
    Thread Starter
       #3

    UsernameIssues said:
    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


  4. Posts : 10,485
    W7 Pro SP1 64bit
       #4

    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


  5. Posts : 10,796
    Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
       #5

    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


  6. Posts : 10,796
    Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
       #6

    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


  7. Posts : 5,642
    Windows 10 Pro (x64)
       #7

    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


  8. Posts : 10,796
    Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
       #8

    In elevated command prompt:

    Code:
     
    dir/als  c:\programdata\desktop*
    dir/als  "c:\users\All Users\Desktop*"
    Post output
      My Computer


  9. Posts : 4
    Windows 7 64bit
    Thread Starter
       #9

    Kaktussoft said:
    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


  10. Posts : 10,796
    Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
       #10

    AllanB said:
    Kaktussoft said:
    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 Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About 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 12:20.
Find Us