current user desktop shortcut?


  1. Posts : 4
    windows 7 ultimate x64
       #1

    current user desktop shortcut?


    I'm trying to create a shortcut on my desktop to access the currently logged on's user's desktop,
    but nothing works,
    neither:

    Code:
    C:\Users\%USERPROFILE%\Desktop
    Code:
    %USERPROFILE%\Desktop
    works but shows all desktop items,

    I just want it to show the items in:
    Code:
    C:\Users\myuser\Desktop
    of course I don't want "myuser" hardcoded,
    is there a workaround?
      My Computer


  2. Posts : 72,051
    64-bit Windows 11 Pro for Workstations
       #2

    Hello Partrick, and welcome to Seven Forums.

    %USERPROFILE%\Desktop would be what you wanted to use for a global shortcut of the current user's Desktop folder.

    It should only show all items in the current user's Desktop folder. What is showing you don't want?
      My Computer


  3. Posts : 4
    windows 7 ultimate x64
    Thread Starter
       #3

    thanks for the warm welcome :)

    well, it is showing all items,
    both user's and public's items,

    that happens only on my windows 7 computer,
    I've got a windows 10 one and it is working fine there,

    I can't understand why it doesn't work in windows 7
      My Computer


  4. Posts : 72,051
    64-bit Windows 11 Pro for Workstations
       #4

    Ah, I see now.

    That wouldn't be the "C:\Users\Public\Desktop" folder included.

    It would be the Desktop shell folder showing instead to show all items.

    I'm not sure why it does this in Windows 7, but not in Windows 10.

    I was going to suggest using this below instead, but it opens the same Desktop shell folder.

    C:\Users\%UserName%\Desktop

    I checked in Environmental Variables, but it's the same in both W7 and W10 for them.
      My Computer


  5. Posts : 1,851
    Windows 7 pro
       #5

    From the command prompt type in the following command. Please post the results.
    Code:
    echo %UserProfile%
      My Computer


  6. Posts : 4
    windows 7 ultimate x64
    Thread Starter
       #6

    this works properly, I mean it returns

    c:\users\patrickdrd

    but when I do %userprofile%\desktop I am redirected to the shell,
    strange, the same thing happens on my windows 8.1 x64 laptop as well,
    I have applied some registry tweaks too,
    could it be related to any of them?
      My Computer


  7. Posts : 72,051
    64-bit Windows 11 Pro for Workstations
       #7

    I wouldn't think so.

    It also opens the Desktop shell folder on my clean install of W7 in a VM.
      My Computer


  8. Posts : 4
    windows 7 ultimate x64
    Thread Starter
       #8

    strange, so it works on windows 10 only?

    I even tried c:\users\%username%\desktop and it doesn't work either,

    because my users folder is %username%.domain
      My Computer


  9. Posts : 72,051
    64-bit Windows 11 Pro for Workstations
       #9

    Appears so. For some reason the variable is linked to the shell folder instead of actual folder in W7 and W8.
      My Computer


 

  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 00:07.
Find Us